Skip to content

Commit 9b4683c

Browse files
authored
category drag addon -- fix comment duplication glitch
1 parent 7a76b59 commit 9b4683c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/addons/addons/toolbox-category-drag/userscript.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,14 @@ export default async function ({ addon }) {
8989
}
9090
}
9191

92-
if (optParse && configComment) {
92+
if (configComment) {
93+
if (!optParse) return true;
94+
9395
const dataLine = configComment.split("\n").find(i => i.endsWith(COMMENT_TRAPPER_ID));
9496
if (!dataLine) return undefined;
9597
return dataLine.substr(0, dataLine.length - COMMENT_TRAPPER_ID.length);
9698
}
99+
return optParse ? unefined : false;
97100
}
98101

99102
function saveOrdering() {

0 commit comments

Comments
 (0)