Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDon't use Object.values in recordUtil #148
Merged
Conversation
| @@ -6,7 +6,8 @@ const serializer = require('../lib/serializer') | |||
| const valueEquals = require('../lib/valueEquals') | |||
|
|
|||
| // ['0', '1', '2'] | |||
| module.exports.CATEGORY_IDS = Object.values(proto.categories) | |||
| // webkit on iOS <= 10.2 does not support Object.values | |||
| module.exports.CATEGORY_IDS = Object.keys(proto.categories).map((key) => proto.categories[key]) | |||
This comment has been minimized.
This comment has been minimized.
diracdeltas
Jul 17, 2017
Member
it would be nice to make this either a global polyfill (if (!Object.values) {Object.values = ...}) or split it into a utility function since it is also used elsewhere (ebd7a1b)
This comment has been minimized.
This comment has been minimized.
ayumi
Jul 17, 2017
Author
Contributor
if you set if (!Object.values) {Object.values = ...} can it apply to all files?
This comment has been minimized.
This comment has been minimized.
diracdeltas
Jul 17, 2017
Member
@ayumi if you add it to client/polyfill/ and then include it in index.html
This comment has been minimized.
This comment has been minimized.
ayumi
Jul 17, 2017
Author
Contributor
@jhreis does that strategy work for you (adding an object.values polyfill to client/polyfill/)
|
I'm going to merge and leave #147 open until the third time we run into this / we figure out the Right way to do it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ayumi commentedJul 17, 2017
•
edited
It doesn't work in iOS <= 10.2
Related to #147