Skip to content

Commit

Permalink
fix: watermark check function
Browse files Browse the repository at this point in the history
  • Loading branch information
zhensherlock committed Sep 2, 2024
1 parent 0c7ae24 commit b58002e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ if [ "$(printf '%s\n' "$REQUIRED_NODE_VERSION" "$CURRENT_NODE_VERSION" | sort -V
exit 1
fi

npm run lint-changelog
npm run lint
5 changes: 1 addition & 4 deletions src/core/watermark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,7 @@ class Watermark {
}

async check () {
if (!this.parentElement.contains(<Node> this.watermarkDom)) {
this.remove()
await this.create()
}
return this.parentElement.contains(<Node> this.watermarkDom)
}

private remove () {
Expand Down

0 comments on commit b58002e

Please sign in to comment.