This repository was archived by the owner on Apr 16, 2019. It is now read-only.
This repository was archived by the owner on Apr 16, 2019. It is now read-only.
the _propCache and _attrCache were twisted. #610
Closed
Description
bug description
the internal variables _propCache
and _attrCache
are twisted, so some code went wrong.
how to reproduce?
af('body').prop('tagName');
af('body').data('key', {a: 3});
af('body').prop('tagName');
how to fix?
to add one more judgement to make code much more robust.
var val = (this[0].afmCacheId && _attrCache[this[0].afmCacheId][attr]) ? (this[0].afmCacheId && _attrCache[this[0].afmCacheId][attr]) : this[0].getAttribute(attr);
changed to
var val = (this[0].afmCacheId && _attrCache[this[0].afmCacheId] && _attrCache[this[0].afmCacheId][attr]) ? _attrCache[this[0].afmCacheId][attr] : this[0].getAttribute(attr);
Metadata
Metadata
Assignees
Labels
No labels