Skip to content

Conversation

@ptMuta
Copy link
Contributor

@ptMuta ptMuta commented Aug 3, 2018

Fixes #2

src/tuple.js Outdated
const root = globalKey in Array
const root = globalKey in Array && Array[globalKey]
? Array[globalKey]
: def(Array, globalKey, new UniversalWeakMap, false);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this could just be

const root = Array[globalKey] ||
  def(Array, globalKey, new UniversalWeakMap, false);

since the value of the property is always truthy once we've defined it?

@ptMuta
Copy link
Contributor Author

ptMuta commented Aug 3, 2018 via email

@benjamn benjamn merged commit e5fb36c into benjamn:master Aug 4, 2018
@dy dy mentioned this pull request Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants