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

Adds a check to only fire the metadata update event if there's an actual change to the data #70

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

holl0wstar
Copy link
Contributor

As discussed on Slack, I forgot to implement this initially.

@seanohue
Copy link
Contributor

I'm testing this soon, but two pieces of feedback:
a) If for some reason, value is an object/array or other non-primitive data type, it could be exactly the same and still emit the event. This is probably okay but something to note in the docs.

b) I'd consider moving the check to be before base[property] = value because if it is exactly the same, why reassign it? Very minor optimization though, to be honest.

@shawncplus shawncplus added the feedback PR/Issue has pending feedback label Jun 3, 2019
@shawncplus shawncplus added this to the 3.2 milestone Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback PR/Issue has pending feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants