|
|
|
|
@ -549,9 +549,7 @@ const instance_script = {
|
|
|
|
|
let labeled_statement;
|
|
|
|
|
|
|
|
|
|
// Analyze declaration bindings to see if they're exclusively updated within a single reactive statement
|
|
|
|
|
const possible_derived = bindings.every(
|
|
|
|
|
(binding) =>
|
|
|
|
|
binding.initial !== null &&
|
|
|
|
|
const possible_derived = bindings.every((binding) =>
|
|
|
|
|
binding.references.every((reference) => {
|
|
|
|
|
const declaration = reference.path.find((el) => el.type === 'VariableDeclaration');
|
|
|
|
|
const assignment = reference.path.find((el) => el.type === 'AssignmentExpression');
|
|
|
|
|
@ -567,7 +565,10 @@ const instance_script = {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
!update && (declaration || (labeled && assignment) || (!labeled && !assignment))
|
|
|
|
|
!update &&
|
|
|
|
|
((declaration && binding.initial) ||
|
|
|
|
|
(labeled && assignment) ||
|
|
|
|
|
(!labeled && !assignment))
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
|