diff --git a/app/Lib/Utilities/NotificationCenter.js b/app/Lib/Utilities/NotificationCenter.js index 33b4be2..d629b8e 100755 --- a/app/Lib/Utilities/NotificationCenter.js +++ b/app/Lib/Utilities/NotificationCenter.js @@ -23,7 +23,6 @@ function (Exception) { this.topics = {}; this.subUid = -1; - var i = 0; this.ns = { client: { pointerLock: { @@ -195,11 +194,14 @@ function (Exception) { }; populate(this.ns); - } NotificationCenter.prototype.validate = function(topic) { + if (topic === undefined) { + throw new Exception("Topic not registered in Nc. See stack trace."); + } + if (typeof topic === 'object') { throw new Exception("Topic bad format " + JSON.stringify(topic)); }