diff --git a/src/runtime/internal/Component.ts b/src/runtime/internal/Component.ts index 3e48010547..c51e7f70ea 100644 --- a/src/runtime/internal/Component.ts +++ b/src/runtime/internal/Component.ts @@ -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 diff --git a/src/runtime/internal/ssr.ts b/src/runtime/internal/ssr.ts index dc4c16dffb..27c4a47a45 100644 --- a/src/runtime/internal/ssr.ts +++ b/src/runtime/internal/ssr.ts @@ -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({ $$ }); diff --git a/src/runtime/internal/utils.ts b/src/runtime/internal/utils.ts index 8868e38ee2..5cb7832add 100644 --- a/src/runtime/internal/utils.ts +++ b/src/runtime/internal/utils.ts @@ -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); }