Skip to content

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

Open
holl0wstar wants to merge 2 commits intoRanvierMUD:masterfrom
holl0wstar:metadatable-check
Open

Adds a check to only fire the metadata update event if there's an actual change to the data#70
holl0wstar wants to merge 2 commits intoRanvierMUD:masterfrom
holl0wstar:metadatable-check

Conversation

@holl0wstar
Copy link
Contributor

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

@seanohue
Copy link

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