diff --git a/js/ext/angular/test/service/ionicPlatform.unit.js b/js/ext/angular/test/service/ionicPlatform.unit.js index 881b01199c..d08f7168f1 100644 --- a/js/ext/angular/test/service/ionicPlatform.unit.js +++ b/js/ext/angular/test/service/ionicPlatform.unit.js @@ -88,6 +88,7 @@ describe('Ionic Platform Service', function() { }); it('is Android', function() { + ionic.Platform.ua = ''; ionic.Platform.setPlatform('Android'); expect(ionic.Platform.isAndroid()).toEqual(true); diff --git a/js/utils/platform.js b/js/utils/platform.js index fe2cc5651f..e19ccfb881 100644 --- a/js/utils/platform.js +++ b/js/utils/platform.js @@ -149,7 +149,7 @@ // exact match var pName = this.platform(); if(pName) { - return pName.toLowerCase() === type; + return pName === type.toLowerCase(); } // A quick hack for to check userAgent