diff --git a/lib/mixins/property-effects.js b/lib/mixins/property-effects.js index 4961eec486..a1808d6b2e 100644 --- a/lib/mixins/property-effects.js +++ b/lib/mixins/property-effects.js @@ -964,6 +964,19 @@ function parseArg(rawArg) { return a; } +function getArgValue(data, props, path) { + let value = get(data, path); + // when data is not stored e.g. `splices`, get the value from changedProps + // TODO(kschaaf): Note, this can cause a rare issue where the wildcard + // info.value could pull a stale value out of changedProps during a reentrant + // change that sets the value back to undefined. + // https://github.com/Polymer/polymer/issues/5479 + if (value === undefined) { + value = props[path]; + } + return value; +} + // data api /** @@ -979,11 +992,8 @@ function parseArg(rawArg) { * @private */ function notifySplices(inst, array, path, splices) { - let splicesPath = path + '.splices'; - inst.notifyPath(splicesPath, { indexSplices: splices }); + inst.notifyPath(path + '.splices', { indexSplices: splices }); inst.notifyPath(path + '.length', array.length); - // Null here to allow potentially large splice records to be GC'ed. - inst.__data[splicesPath] = {indexSplices: null}; } /** @@ -2140,37 +2150,23 @@ export const PropertyEffects = dedupingMixin(superClass => { */ _marshalArgs(args, path, props) { const data = this.__data; - let values = []; + const values = []; for (let i=0, l=args.length; i