Comparing version 0.4.0-beta.1 to 0.4.0-beta.2
{ | ||
"name": "okam-core", | ||
"version": "0.4.0-beta.1", | ||
"version": "0.4.0-beta.2", | ||
"description": "The extension for small program framework", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -179,2 +179,7 @@ /** | ||
if (old !== value || (typeof old === 'object')) { | ||
let needUpdate = this.shouldUpdate ? this.shouldUpdate(old, value) : true; | ||
if (!needUpdate) { | ||
return; | ||
} | ||
ctx.data[p] = value; | ||
@@ -181,0 +186,0 @@ ctx.$setData({[p]: value}); |
@@ -8,2 +8,4 @@ /** | ||
import isValueEqual from './equal'; | ||
/* eslint-disable fecs-prefer-destructure */ | ||
@@ -88,2 +90,6 @@ | ||
function shouldUpdate(old, curr) { | ||
return !isValueEqual(old, curr); | ||
} | ||
function onStoreChange() { | ||
@@ -95,3 +101,5 @@ let observer = this.__computedObserver; | ||
} | ||
if (observer && upKeys) { | ||
observer.shouldUpdate || (observer.shouldUpdate = shouldUpdate); | ||
upKeys.forEach(k => observer.updateComputed(k)); | ||
@@ -98,0 +106,0 @@ } |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
161252
91
5552
6