Skip to content

Commit

Permalink
fix: πŸ› menu callback issue
Browse files Browse the repository at this point in the history
`+` on arrays returns a string in js...
  • Loading branch information
melMass committed Jul 3, 2024
1 parent d687497 commit d64fac4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/comfy_shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ const create_documentation_stylesheet = () => {
border-radius: 6px;
border: 3px solid var(--bg-color);
}
/* Scrollbar styling for Firefox */
scrollbar-width: thin;
scrollbar-color: var(--fg-color) var(--bg-color);
Expand All @@ -726,7 +726,7 @@ const create_documentation_stylesheet = () => {
border-collapse: collapse;
border: 1px var(--border-color) solid;
}
.documentation-popup th,
.documentation-popup th,
.documentation-popup td {
border: 1px var(--border-color) solid;
}
Expand Down Expand Up @@ -1025,8 +1025,8 @@ export function addMenuHandler(nodeType, cb) {
*/
nodeType.prototype.getExtraMenuOptions = function (app, options) {
const r = getOpts.apply(this, [app, options]) || []
const newItems = cb.apply(this, [app, options])
return r + newItems
const newItems = cb.apply(this, [app, options]) || []
return [...r, ...newItems]
}
}

Expand Down

0 comments on commit d64fac4

Please sign in to comment.