From b051fa7c9f1fe99962595be71e278f77453d332b Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Mon, 24 Feb 2014 14:44:59 -0600 Subject: [PATCH] platform test fix --- js/ext/angular/test/service/ionicPlatform.unit.js | 1 + js/utils/platform.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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