Skip to content

Commit

Permalink
Add comments per review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Feb 21, 2019
1 parent 52fe20d commit bef674a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/mixins/property-accessors.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ export const PropertyAccessors = dedupingMixin(superClass => {
*/
_definePropertyAccessor(property, readOnly) {
if (legacyNoBatch) {
// Ensure properties are not flushed when adding instance effects
const ready = this.__dataReady;
this.__dataReady = false;
saveAccessorValue(this, property);
Expand Down
7 changes: 5 additions & 2 deletions lib/mixins/property-effects.js
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,8 @@ export const PropertyEffects = dedupingMixin(superClass => {
this._flushClients();
// Capture element data and flush properties one-by one to defeat
// Polymer 2.x's batched _propertiesChanged scheme; this approximates
// 1.x's applyConfig
// 1.x's applyConfig. Data is reset to mimic 1.x behavior of
// properties incrementally being initialized
const changedProps = this.__data;
const notify = this.__dataToNotify;
this.__data = {};
Expand Down Expand Up @@ -1732,7 +1733,9 @@ export const PropertyEffects = dedupingMixin(superClass => {
// Compute properties
if (legacyNoBatch) {
// When not batching, computed effects may re-enter, so capture
// notifying properties early
// notifying properties early. Use simple runEffects rather than
// runComputedEffects since computed effects will run immediately
// rather than being batched.
notifyProps = this.__dataToNotify;
this.__dataToNotify = null;
runEffects(this, this[TYPES.COMPUTE], changedProps, oldProps, hasPaths);
Expand Down

0 comments on commit bef674a

Please sign in to comment.