Skip to content

Commit

Permalink
release v1.1.7 | bugfix: fix the issue that the parameter 'isSwitch' …
Browse files Browse the repository at this point in the history
…of the callback 'options.begin' returned incorrect values in some cases
  • Loading branch information
JaminQ committed Nov 26, 2024
1 parent 1896df8 commit 978195d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion dist/darkmode.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/darkmode.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mp-darkmode",
"version": "1.1.5",
"version": "1.1.7",
"description": "微信公众平台图文 Dark Mode 转换算法",
"main": "dist/darkmode.min.js",
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion src/modules/domUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ export class DomUtils {
}

hasDelay() {
return this._delayEls.length > 0;
if (this._els.length) return false; // 有节点,即不含延迟处理的节点
return this._delayEls.length > 0 || config.container !== null; // 否则需要判断延迟节点的列表和容器
}

addFirstPageNode(el) {
Expand Down
2 changes: 1 addition & 1 deletion test/darkmode_online.js

Large diffs are not rendered by default.

0 comments on commit 978195d

Please sign in to comment.