Skip to content

Commit 8ff3229

Browse files
committed
comments added
1 parent fe1347a commit 8ff3229

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Onyx.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ function keyChanged(key, data, hasNewValue = true) {
283283
// Find all subscribers that were added with connect() and trigger the callback or setState() with the new data
284284
_.each(callbackToStateMapping, (subscriber) => {
285285
if (subscriber && isKeyMatch(subscriber.key, key)) {
286+
// If data is not new then only trigger the callback or setState() for subscribers which are not initialized with Stored value
286287
if (!hasNewValue && (subscriber.initWithStoredValues !== false)) {
287288
return;
288289
}

0 commit comments

Comments
 (0)