diff --git a/lib/dispatcher/nopeDispatcher.ts b/lib/dispatcher/nopeDispatcher.ts index 3d70956..7aebdbf 100644 --- a/lib/dispatcher/nopeDispatcher.ts +++ b/lib/dispatcher/nopeDispatcher.ts @@ -274,16 +274,16 @@ declare const window; * @param uuid The Unique Id of the Dispatcher * @param communicator The provided communicator */ -export function getDispatcher(uuid: string, communicator: ICommunicationInterface){ +export function getDispatcher(uuid: string, communicator: ICommunicationInterface) { // Get the global variable const _global = typeof global !== "undefined" ? global : window; - const _accessor = '__singletons__'+uuid; + const _accessor = '__singletons__' + uuid; const _hasDispatcher = _global[_accessor] !== undefined; - if (!_hasDispatcher){ + if (!_hasDispatcher) { _global[_accessor] = new nopeDispatcher(communicator); } - + return _global[_accessor] as nopeDispatcher } \ No newline at end of file diff --git a/lib/dispatcher/nopeDispatcherDecorators.ts b/lib/dispatcher/nopeDispatcherDecorators.ts index 9978de7..fcb8fc9 100644 --- a/lib/dispatcher/nopeDispatcherDecorators.ts +++ b/lib/dispatcher/nopeDispatcherDecorators.ts @@ -15,10 +15,6 @@ export interface IExportPropertyToDispatcherParameters { readonly?: boolean } -export const unicorn = { - test: [] -} - /** * Decorator used to export a Class API over openAPI * @param options @@ -33,7 +29,7 @@ export function exportsElementsToDispatcher(options: IExportToDispatcherParamete // extract the Registered Methods of the Class. const registeredMethods = Base.prototype[_registeredDispatcherMethods_] as Map; - const registeredParams = Base.prototype[_registeredDispatcherParams_] as Map; + const registeredParams = Base.prototype[_registeredDispatcherParams_] as Map; // Online if they are present, iterate over them if (registeredMethods) {