mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
refactor(platform): do not console.error on device get
With user agent fallbacks, its unnecessary to print out errors if the device plugin isn’t there.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user