Skip to content

Commit ad19de5

Browse files
authored
🐛 修正 GM_addElement("tagName") 错误 (#1120)
1 parent e635911 commit ad19de5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/service/content/gm_api/gm_api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ export default class GMApi extends GM_Base {
703703
parentNodeId = id;
704704
} else {
705705
parentNodeId = null;
706-
attrs = tagName as Record<string, string | number | boolean>;
706+
attrs = (tagName || {}) as Record<string, string | number | boolean>;
707707
tagName = parentNode as string;
708708
}
709709
if (typeof tagName !== "string") throw new Error("The parameter 'tagName' of GM_addElement shall be a string.");

0 commit comments

Comments
 (0)