"git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "d6ec303efff5a3ee41014e26a00c0707a02b9752"
Commit bfb13f5e authored by comfyanonymous's avatar comfyanonymous
Browse files

Remove useless call to /object_info

parent db27b040
...@@ -174,7 +174,7 @@ const els = {} ...@@ -174,7 +174,7 @@ const els = {}
// const ctxMenu = LiteGraph.ContextMenu; // const ctxMenu = LiteGraph.ContextMenu;
app.registerExtension({ app.registerExtension({
name: id, name: id,
init() { addCustomNodeDefs(node_defs) {
const sortObjectKeys = (unordered) => { const sortObjectKeys = (unordered) => {
return Object.keys(unordered).sort().reduce((obj, key) => { return Object.keys(unordered).sort().reduce((obj, key) => {
obj[key] = unordered[key]; obj[key] = unordered[key];
...@@ -182,10 +182,10 @@ app.registerExtension({ ...@@ -182,10 +182,10 @@ app.registerExtension({
}, {}); }, {});
}; };
const getSlotTypes = async () => { function getSlotTypes() {
var types = []; var types = [];
const defs = await api.getNodeDefs(); const defs = node_defs;
for (const nodeId in defs) { for (const nodeId in defs) {
const nodeData = defs[nodeId]; const nodeData = defs[nodeId];
...@@ -212,8 +212,8 @@ app.registerExtension({ ...@@ -212,8 +212,8 @@ app.registerExtension({
return types; return types;
}; };
const completeColorPalette = async (colorPalette) => { function completeColorPalette(colorPalette) {
var types = await getSlotTypes(); var types = getSlotTypes();
for (const type of types) { for (const type of types) {
if (!colorPalette.colors.node_slot[type]) { if (!colorPalette.colors.node_slot[type]) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment