From 150f116e53087ae451639ca2e40977e12227e8d2 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Thu, 4 Sep 2014 23:38:00 -0500 Subject: [PATCH] refactor(platform): do not console.error on device get MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With user agent fallbacks, its unnecessary to print out errors if the device plugin isn’t there. --- js/utils/platform.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/js/utils/platform.js b/js/utils/platform.js index ee0b9eb911..7d44698b21 100644 --- a/js/utils/platform.js +++ b/js/utils/platform.js @@ -104,9 +104,7 @@ * @returns {object} The device object. */ device: function() { - if(window.device) return window.device; - if(this.isWebView()) console.error('device plugin required'); - return {}; + return window.device || {}; }, _checkPlatforms: function(platforms) {