From c3931df2ae06edf48983c5e629ba2c1b12721400 Mon Sep 17 00:00:00 2001 From: Neil Fraser Date: Thu, 7 Apr 2016 16:24:27 -0700 Subject: [PATCH] Fix shadow block init on headless workspaces. --- core/connection.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/connection.js b/core/connection.js index 89b4aef27..8f32d746b 100644 --- a/core/connection.js +++ b/core/connection.js @@ -543,7 +543,9 @@ Blockly.Connection.prototype.disconnect = function() { } else { throw 'Child block does not have output or previous statement.'; } - blockShadow.initSvg(); + if (blockShadow.initSvg) { + blockShadow.initSvg(); + } blockShadow.render(false); }