more explicit code

pull/6559/head
Tan Li Hau 5 years ago
parent 46d5c3865a
commit 57952fe871

@ -668,7 +668,11 @@ export default class Component {
// NOTE: add store variable first, then only $store value // NOTE: add store variable first, then only $store value
// as `$store` will mark `store` variable as referenced and subscribable // as `$store` will mark `store` variable as referenced and subscribable
const sorted_globals = Array.from(globals.keys()).sort().reverse(); const global_keys = Array.from(globals.keys());
const sorted_globals = [
...global_keys.filter(key => key[0] !== '$'),
...global_keys.filter(key => key[0] === '$')
];
sorted_globals.forEach(name => { sorted_globals.forEach(name => {
if (this.var_lookup.has(name)) return; if (this.var_lookup.has(name)) return;

Loading…
Cancel
Save