aboutsummaryrefslogtreecommitdiffstats
path: root/src/layout.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout.js')
-rw-r--r--src/layout.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/layout.js b/src/layout.js
index 000d22c..c9c2a4d 100644
--- a/src/layout.js
+++ b/src/layout.js
@@ -20,6 +20,8 @@ export default class Layout {
this.src += '}';
const info = await gv.renderJSONObject(this.src, { format: 'json0' });
+ info.objects ||= [];
+ info.edges ||= [];
const [width, height] = info.bb.split(',').map(toNumber).slice(2);
const positions = {};