From 89d143de2291b1131e59998825b947e06338c0fc Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Wed, 16 Dec 2020 21:38:43 -0500 Subject: [PATCH] fix cam dependencies in fdm mode --- src/mode/cam/client.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mode/cam/client.js b/src/mode/cam/client.js index ea6bd466..3f3ac87e 100644 --- a/src/mode/cam/client.js +++ b/src/mode/cam/client.js @@ -96,6 +96,7 @@ let hasTabs = false; let hasTraces = false; // ensure trace op is a singleton for now + if (proc.ops) for (let i=0; i { let oplist = current.process.ops; + if (!oplist) return; if (oplist.indexOf(rec) < 0) { oplist.push(rec); API.conf.save(); @@ -282,6 +284,7 @@ api.event.on("cam.op.del", func.opDel = (rec) => { let oplist = current.process.ops; + if (!oplist) return; let pos = oplist.indexOf(rec); if (pos >= 0) { oplist.splice(pos,1); @@ -296,7 +299,7 @@ let mark = Date.now(); let html = []; let ops = current.process.ops; - let oplist = ops.length > 0 ? ops : [{ + let oplist = ops && ops.length > 0 ? ops : [{ type: "use right menu to add milling operations ... drag & drop to re-order" }]; let bind = {};