Fix DUMAS workflow aux_id metadata
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
// original licenses; this file only makes their UI available from DumasNodes.
|
// original licenses; this file only makes their UI available from DumasNodes.
|
||||||
|
|
||||||
const modules = [
|
const modules = [
|
||||||
|
"./dumas_workflow_metadata.js",
|
||||||
"./vendor/dumas_h3_continuum/decode_cache_helper.js",
|
"./vendor/dumas_h3_continuum/decode_cache_helper.js",
|
||||||
"./vendor/dumas_h3_continuum/easy_bypass_toggle.js",
|
"./vendor/dumas_h3_continuum/easy_bypass_toggle.js",
|
||||||
"./vendor/dumas_h3_continuum/easy_load_audio.js",
|
"./vendor/dumas_h3_continuum/easy_load_audio.js",
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
// DUMAS nodes are namespaced copies of upstream nodes. Remove copied
|
||||||
|
// upstream aux_id metadata because it is invalid for the namespaced node.
|
||||||
|
function sanitizeDumasMetadata(node) {
|
||||||
|
if (!node || typeof node.type !== "string" || !node.type.startsWith("Dumas")) return;
|
||||||
|
const properties = node.properties;
|
||||||
|
if (!properties || !Object.prototype.hasOwnProperty.call(properties, "aux_id")) return;
|
||||||
|
delete properties.aux_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
app.registerExtension({
|
||||||
|
name: "DumasNodes.WorkflowMetadata",
|
||||||
|
nodeCreated: sanitizeDumasMetadata,
|
||||||
|
loadedGraphNode: sanitizeDumasMetadata,
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user