Skip to content
Snippets Groups Projects
Commit 1473132a authored by Piotr Gawron's avatar Piotr Gawron
Browse files

singleton refactored (so IDE can follow types)

parent fafb5c40
No related branches found
No related tags found
1 merge request!736Resolve "automatic Refresh - it would be nice to have"
......@@ -30,6 +30,8 @@ function GuiConnector() {
GuiConnector.prototype = Object.create(ObjectWithListeners.prototype);
GuiConnector.prototype.constructor = GuiConnector;
var singleton = new GuiConnector();
/**
*
* @param {GuiConnector} object
......@@ -37,7 +39,7 @@ GuiConnector.prototype.constructor = GuiConnector;
*/
function returnThisOrSingleton(object) {
if (object === undefined || object === null) {
return GuiConnector.singleton;
return singleton;
} else {
return object;
}
......@@ -566,6 +568,5 @@ GuiConnector.prototype.warn = function (message) {
$(self._warnDialog).dialog("open");
};
GuiConnector.singleton = new GuiConnector();
module.exports = GuiConnector.singleton;
module.exports = singleton;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment