Commit 41ac1e01 authored by Sven Franck's avatar Sven Franck

loadGadget: added check to update DOM when reloading gadget

parent ca08017b
......@@ -150,6 +150,11 @@ var RenderJs = (function () {
RenderJs.GadgetIndex.registerGadget(gadget_js);
}
// update gadget.dom if it's contents are not in the document
if (!gadget_js.dom.closest("body").length) {
gadget_js.dom = gadget;
}
if (gadget_js.isReady()) {
// avoid loading again gadget which was loaded before in same page
return ;
......
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