diff --git a/scripts/h5peditor.js b/scripts/h5peditor.js
index 3affeec6e0dc6d90746129875887c74c1df76493..7dd597d3b58fb056324c8195f66bb52502b5c99c 100644
--- a/scripts/h5peditor.js
+++ b/scripts/h5peditor.js
@@ -88,9 +88,11 @@ ns.renderableCommonFields = {};
     script.onload = function () {
       H5PIntegration.loadedJs.push(src);
       loading[src].forEach(cb => cb());
+      delete loading[src];
     };
     script.onerror = function (err) {
       loading[src].forEach(cb => cb(err));
+      delete loading[src];
     };
     script.src = src;
     document.head.appendChild(script);