removeData doesn't properly remove the id on Chrome #1858
Closed
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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After updated to 4.11.4, I saw the error below many times.
This is because
getData
returns null invjs.on
and prior to that, 'removeData' failed to delete the id withdelete el[vjs.expando]
.So far this happens only on Chrome(40.0.2214.111) and only when
el
isobject
element.I tested
delete
syntax itself withobject
element on Chrome, but it actually failed to delete the property even though it returnstrue
.So I guess it should be Chrome's bug but I would suggest to make a change to
getData
to make sure it doesn't returnnull
all the time.