AdapterJS
AdapterJS copied to clipboard
get config values from global object related to issue #69
This is needed for AdapterJS to be able to pick values that have been set before it is required or imported, otherwise the var AdapterJS = ...
itself is already overwriting whatever was in the global variable.
It is interpreted as:
var AdaptjerJS;
AdaptjerJS = AdapterJS || {};
Accessing through window solves the issue. Does it make sense to you?
LGTM. @letchoo any objections ?
Actually, I think the way I did it, the real AdapterJS would be available in global scope. What do you think about getting only a copy of the config values with
var AdapterJS = (window && window.AdapterJS && JSON.parse(JSON.stringify(window.AdapterJS))) || {};
?
This way the real AdapterJS truly remains local and won't be available in the global scope.
Will it be possible to merge this? :)