Skip to content

Commit d432a42

Browse files
committed
group condition for code review
1 parent b9a84a5 commit d432a42

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/compiler/compile/Component.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -798,14 +798,13 @@ export default class Component {
798798

799799
names.forEach(name => {
800800
const scope_owner = scope.find_owner(name);
801-
if (scope_owner !== null) {
802-
if (scope_owner === instance_scope) {
803-
const variable = component.var_lookup.get(name);
804-
variable[deep ? 'mutated' : 'reassigned'] = true;
805-
}
806-
} else if (module_scope && module_scope.has(name)) {
801+
if (
802+
scope_owner !== null
803+
? scope_owner === instance_scope
804+
: module_scope && module_scope.has(name)
805+
) {
807806
const variable = component.var_lookup.get(name);
808-
variable[deep ? 'mutated' : 'reassigned'] = true;
807+
variable[deep ? "mutated" : "reassigned"] = true;
809808
}
810809
});
811810
}

0 commit comments

Comments
 (0)