From 5707d85fa546557ac69322388ca998cacf4cd7c5 Mon Sep 17 00:00:00 2001 From: Mike Whiting Date: Sun, 28 Jan 2018 11:12:50 +0000 Subject: [PATCH] fix to iframe element selection --- dist/js/plugin-reload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/js/plugin-reload.js b/dist/js/plugin-reload.js index f9b578f..48fac47 100644 --- a/dist/js/plugin-reload.js +++ b/dist/js/plugin-reload.js @@ -20,7 +20,7 @@ var PluginReload = { wsc.onmessage = function () { var targetOrigin = (window.location.protocol === 'file:') ? '*' : window.location.protocol+'//'+window.location.host; var obj = JSON.stringify({"event": "patternLab.reload"}); - document.getElementById('sg-viewport').contentWindow.postMessage(obj, targetOrigin); + document.getElementsByClassName('pl-c-viewport__iframe')[0].contentWindow.postMessage(obj, targetOrigin); }; // when there's an error update the pattern lab nav bar