mirror of
https://github.com/Hopiu/postal.js.git
synced 2026-03-16 22:20:23 +00:00
Fixed bug with postal.configuration.SYSTEM_CHANNEL reference and added __postalReady__ array to help external tools like Chrome dev tools extension(s) to know when postal has been loaded...
This commit is contained in:
parent
1c17297e20
commit
5a74064466
5 changed files with 13 additions and 9 deletions
|
|
@ -356,7 +356,6 @@
|
|||
}
|
||||
}
|
||||
};
|
||||
localBus.subscriptions[postal.configuration.SYSTEM_CHANNEL] = {};
|
||||
/* global localBus, bindingsResolver, ChannelDefinition, SubscriptionDefinition, postal */
|
||||
/*jshint -W020 */
|
||||
postal = {
|
||||
|
|
@ -434,10 +433,13 @@
|
|||
}
|
||||
}
|
||||
};
|
||||
localBus.subscriptions[postal.configuration.SYSTEM_CHANNEL] = {};
|
||||
|
||||
/*jshint -W106 */
|
||||
if ( global.hasOwnProperty( "__postalReady__" ) && typeof global.__postalReady__ === "function" ) {
|
||||
global.__postalReady__();
|
||||
if ( global.hasOwnProperty( "__postalReady__" ) && _.isArray( global.__postalReady__ ) ) {
|
||||
while(global.__postalReady__.length) {
|
||||
global.__postalReady__.shift(postal);
|
||||
}
|
||||
}
|
||||
/*jshint +W106 */
|
||||
|
||||
|
|
|
|||
2
lib/postal.min.js
vendored
2
lib/postal.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -74,4 +74,5 @@ postal = {
|
|||
postal.configuration.resolver.reset();
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
localBus.subscriptions[postal.configuration.SYSTEM_CHANNEL] = {};
|
||||
|
|
@ -100,5 +100,4 @@ var localBus = {
|
|||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
localBus.subscriptions[postal.configuration.SYSTEM_CHANNEL] = {};
|
||||
};
|
||||
|
|
@ -28,8 +28,10 @@
|
|||
//import("Api.js");
|
||||
|
||||
/*jshint -W106 */
|
||||
if ( global.hasOwnProperty( "__postalReady__" ) && typeof global.__postalReady__ === "function" ) {
|
||||
global.__postalReady__();
|
||||
if ( global.hasOwnProperty( "__postalReady__" ) && _.isArray( global.__postalReady__ ) ) {
|
||||
while(global.__postalReady__.length) {
|
||||
global.__postalReady__.shift(postal);
|
||||
}
|
||||
}
|
||||
/*jshint +W106 */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue