Skip to content
Permalink
Browse files
check the window.cordova object a little more strictly
  • Loading branch information
purplecabbage committed May 5, 2015
1 parent 69ae6c9 commit 413c874db3e419b7f8219901bd591c8c901d2696
Showing 1 changed file with 5 additions and 1 deletion.
@@ -19,12 +19,16 @@
*
*/

if ("cordova" in window) { throw new Error("cordova already defined"); };



var channel = require('cordova/channel');
var platform = require('cordova/platform');

if (window.cordova && window.cordova.platformId && window.cordova.platformId == platform.id){
throw new Error("cordova already defined");
};

/**
* Intercept calls to addEventListener + removeEventListener and handle deviceready,
* resume, and pause events.

0 comments on commit 413c874

Please sign in to comment.