Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform.is returns wrong value in v4 #15165

Closed
ASHFAQPATWARI opened this issue Aug 14, 2018 · 4 comments
Closed

Platform.is returns wrong value in v4 #15165

ASHFAQPATWARI opened this issue Aug 14, 2018 · 4 comments
Assignees

Comments

@ASHFAQPATWARI
Copy link

ASHFAQPATWARI commented Aug 14, 2018

Bug Report

When running on chrome desktop browser, this.platform.is('core') should return true. But currently it returns false.
Ionic Info
Run ionic info from a terminal/cmd prompt and paste the output below.

Ionic:

   ionic (Ionic CLI)          : 4.0.6 (/usr/local/lib/node_modules/ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.2
   @angular-devkit/core       : 0.7.1
   @angular-devkit/schematics : 0.7.1
   @angular/cli               : 6.1.1
   @ionic/ng-toolkit          : 1.0.1
   @ionic/schematics-angular  : 1.0.2

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : none

System:

   NodeJS : v10.1.0 (/usr/local/bin/node)
   npm    : 6.3.0
   OS     : macOS High Sierra
   Xcode  : Xcode 9.4.1 Build version 9F2000

Steps to Reproduce
Steps to reproduce the behavior:

  1. Console log this.platform.is('core') and run on desktop browser.
  2. See that it logs false

Expected Behavior
this.platform.is('core') Should return true

Additional Context
this.platform.platforms() also returns ['android'] which is wrong.

Related issue: #15051

@brandyscarney
Copy link
Member

Thanks for the issue! We will look into this.

Merging the following issues into this one to verify/fix:

@ionitron-bot ionitron-bot bot removed the triage label Aug 14, 2018
@gbacskai
Copy link

gbacskai commented Aug 15, 2018

similar here:
ionic serve:
native chrome (osx) : ["core"] - ok
change chrome as browse in iPhoneX: ["mobile", "ios", "iphone", "mobileweb"] - ok

but when I put the whole code from ./platform/browser/www:
native chrome : ["cordova", "core"] - ok
change chrome as browse in iPhoneX: ["cordova", "mobile", "ios", "iphone"] - not ok as this is a web browser

from ./platforms/browser/www is having the issue
from ./www is ok, ionic serve is ok

@goelectricstations
Copy link

same issue

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 24, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants