diff --git a/src/runtime/internal/Component.ts b/src/runtime/internal/Component.ts index 459a78031a..6c14c71b4c 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 } from './dom'; import { transition_in } from './transitions'; @@ -110,7 +110,7 @@ export function init(component, options, instance, create_fragment, not_equal, p props, update: noop, not_equal, - bound: blank_object(), + bound: {}, // lifecycle on_mount: [], @@ -120,7 +120,7 @@ export function init(component, options, instance, create_fragment, not_equal, p context: new Map(parent_component ? parent_component.$$.context : []), // everything else - callbacks: blank_object(), + callbacks: {}, dirty, skip_bound: false }; diff --git a/src/runtime/internal/ssr.ts b/src/runtime/internal/ssr.ts index 2d843abb2f..24015bce00 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 '../../compiler/compile/render_ssr/handlers/shared/boolean_attributes'; export const invalid_attribute_name_character = /[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u; @@ -85,7 +85,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 3b8815cb1d..46df7aa0bc 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) { fns.forEach(run); }