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:
ifandelse 2013-09-05 02:18:44 -04:00
parent 1c17297e20
commit 5a74064466
5 changed files with 13 additions and 9 deletions

View file

@ -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

File diff suppressed because one or more lines are too long

View file

@ -74,4 +74,5 @@ postal = {
postal.configuration.resolver.reset();
}
}
};
};
localBus.subscriptions[postal.configuration.SYSTEM_CHANNEL] = {};

View file

@ -100,5 +100,4 @@ var localBus = {
}
}
}
};
localBus.subscriptions[postal.configuration.SYSTEM_CHANNEL] = {};
};

View file

@ -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 */