From cf47591debb45046bd1d1987b238fe4cf39b7dbb Mon Sep 17 00:00:00 2001 From: Karan Gandhi Date: Tue, 12 Jun 2018 11:37:30 +0530 Subject: [PATCH] Removed Duplicate Key Removed duplicate key. --- www/plugin.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/www/plugin.js b/www/plugin.js index e536473..cb5be22 100644 --- a/www/plugin.js +++ b/www/plugin.js @@ -1,4 +1,14 @@ -var exec = require('cordova/exec'); +let exec; +try { + exec = require('cordova/exec'); +} catch (error) { + console.log('Cordova exec not found'); + exec = function (cb, err, PLUGIN_NAME, RootCheck, args) { + console.log('Invoked RootCheck:' + RootCheck); + cb(); + }; +} + var PLUGIN_NAME = 'cdvRootBeer'; @@ -41,10 +51,7 @@ var cdvRootBeer = { }, checkForRootNative: function (cb, err) { exec(cb, err, PLUGIN_NAME, 'checkForRootNative', []); - }, - detectTestKeys: function (cb,err) { - exec(cb, err, PLUGIN_NAME, 'detectTestKeys', []); - }, + }, checkForMagiskBinary: function (cb,err) { exec(cb, err, PLUGIN_NAME, 'checkForMagiskBinary', []); }