added comments describing why we use get_registered_params before notifying read methods

pull/11774/head
godzylinux 2 years ago
parent 6d90448367
commit 3c706feedf

@ -20,6 +20,7 @@ export const ReactiveMap = make_reactive(Map, {
}
options.get_registered_params('has')?.forEach((value, param) => {
// because we don't want to notify `has` for items that are currently not in the map
if (!options.value.has(param)) {
return;
}
@ -27,6 +28,7 @@ export const ReactiveMap = make_reactive(Map, {
});
options.get_registered_params('get')?.forEach((value, param) => {
// because we don't want to notify `get` for items that are currently not in the map
if (!options.value.has(param)) {
return;
}

@ -16,6 +16,7 @@ export const ReactiveSet = make_reactive(Set, {
return false;
}
options.get_registered_params('has')?.forEach((value, param) => {
// because we don't want to notify `has` for items that are currently not in the set
if (!options.value.has(param)) {
return;
}

Loading…
Cancel
Save