Skip to content

Commit

Permalink
Fixed a bug with the JavaScript when used with the Device plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
joelambert committed Apr 24, 2015
1 parent bbc6aae commit 2c3c7c4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions www/app-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ var exec = require('cordova/exec');
var channel = require('cordova/channel');
var utils = require('cordova/utils');

// Wait on the CordovaInfoReady event
channel.waitForInitialization('onCordovaInfoReady');
channel.createSticky('onCordovaAppVersionReady');
// Wait on the onCordovaAppVersionReady event
channel.waitForInitialization('onCordovaAppVersionReady');

/**
* Object representing the app's native version and build number
Expand All @@ -45,7 +46,7 @@ var RareloopAppVersion = function () {
_this.version = info.version;
_this.build = parseInt(info.build, 10);

channel.onCordovaInfoReady.fire();
channel.onCordovaAppVersionReady.fire();
},function(e) {
_this.available = false;
utils.alert("[ERROR] Error initializing Version Plugin: " + e);
Expand Down

0 comments on commit 2c3c7c4

Please sign in to comment.