get rid of `blank_object`

pull/7703/head
Ivan Hofer 4 years ago
parent 52f5005cfd
commit 9e51c8612d

@ -1,6 +1,6 @@
import { add_render_callback, flush, schedule_update, dirty_components } from './scheduler';
import { current_component, set_current_component } from './lifecycle';
import { blank_object, is_empty, is_function, run, run_all, noop } from './utils';
import { is_empty, is_function, run, run_all, noop } from './utils';
import { children, detach, start_hydrating, end_hydrating } from './dom';
import { transition_in } from './transitions';
@ -116,7 +116,7 @@ export function init(component, options, instance, create_fragment, not_equal, p
props,
update: noop,
not_equal,
bound: blank_object(),
bound: {},
// lifecycle
on_mount: [],
@ -127,7 +127,7 @@ export function init(component, options, instance, create_fragment, not_equal, p
context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
// everything else
callbacks: blank_object(),
callbacks: {},
dirty,
skip_bound: false,
root: options.target || parent_component.$$.root

@ -1,5 +1,5 @@
import { set_current_component, current_component } from './lifecycle';
import { run_all, blank_object } from './utils';
import { run_all } from './utils';
import { boolean_attributes } from '../../shared/boolean_attributes';
export { is_void } from '../../shared/utils/names';
@ -150,7 +150,7 @@ export function create_ssr_component(fn) {
on_mount: [],
before_update: [],
after_update: [],
callbacks: blank_object()
callbacks: {}
};
set_current_component({ $$ });

@ -24,10 +24,6 @@ export function run(fn) {
return fn();
}
export function blank_object() {
return Object.create(null);
}
export function run_all(fns: Function[]) {
fns.forEach(run);
}

Loading…
Cancel
Save