fix(@ionic/angular): Pre-populate the platforms array for further usage #14466
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
_platforms
array wasn't being populated on provider instantiation. Added the appropriate chunk to populate the array so that when we use other functions from the provider, we get the correct data in return.Short description of what this resolves:
It resolves the usage of Platform.is() and other functions from
@ionic/angular/src/providers/platform.ts
The functions were not working as expected because the
_platforms
array was always empty.Fixed it.
Changes proposed in this pull request:
Ionic Version: 4.x
Fixes: #14465