How to get ionic.Platform.device().available to return false?


#1

I can’t seem to figure out how I was able to get ionic.Platform.device().available to return false when I was running in the browser. I just assumed that ionic.Platform.device() would always return empty in the browser because cordova isn’t loaded so I was doing something like if(!angular.equals({}, ionic.Platform.device())) to detect if I was on a device and cordova was loaded.

I’m not sure when or how, but I noticed that .device() was actually returning an object now in the browser and had a property “available” that returned false. I was just playing with Ionic Analytics so I’m assuming it had something to do with that and possibly me adding the web platform client but I rolled back to an earlier commit and now I can’t seem to get that back. I would much rather prefer to use that .available property if I can but I honestly have no idea where it came from.