fix: 🐛 menu callback issue

`+` on arrays returns a string in js...
This commit is contained in:
Mel Massadian
2024-07-03 18:11:07 +02:00
parent d687497d80
commit d64fac4b74
+4 -4
View File
@@ -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);
@@ -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;
}
@@ -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]
}
}