Skip to content

avoid calling peekMeta when meta does not exist#17057

Closed
bekzod wants to merge 1 commit intoemberjs:masterfrom
bekzod:peek-meta-null
Closed

avoid calling peekMeta when meta does not exist#17057
bekzod wants to merge 1 commit intoemberjs:masterfrom
bekzod:peek-meta-null

Conversation

@bekzod
Copy link
Copy Markdown
Contributor

@bekzod bekzod commented Oct 8, 2018

differentiate between not passing meta and meta not existing.

many meta related functions allow passing meta as last argument and do check if meta passed as following:

let meta = _meta === undefined ? peekMeta(obj) : _meta;

is such case peekMeta() is called even if last argument is passed as undefined since meta does not exist, to avoid it made peekMeta to return null instead of undefined

@bekzod
Copy link
Copy Markdown
Contributor Author

bekzod commented Oct 8, 2018

closing this for now, it is typescript lint nightmare

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.

1 participant