File tree 2 files changed +7
-8
lines changed
2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ function keyed(
160
160
const last = block . getUniqueName ( `${ each_block } _last` ) ;
161
161
const expected = block . getUniqueName ( `${ each_block } _expected` ) ;
162
162
163
- block . addVariable ( lookup , `Object.create(null )` ) ;
163
+ block . addVariable ( lookup , `@blankObject( )` ) ;
164
164
block . addVariable ( head ) ;
165
165
block . addVariable ( last ) ;
166
166
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ export * from './dom.js';
4
4
export * from './transitions.js' ;
5
5
export * from './utils.js' ;
6
6
7
+ export function blankObject ( ) {
8
+ return Object . create ( null ) ;
9
+ }
10
+
7
11
export function destroy ( detach ) {
8
12
this . destroy = noop ;
9
13
this . fire ( 'destroy' ) ;
@@ -63,13 +67,8 @@ export function get(key) {
63
67
export function init ( component , options ) {
64
68
component . options = options ;
65
69
66
- component . _observers = {
67
- pre : Object . create ( null ) ,
68
- post : Object . create ( null )
69
- } ;
70
-
71
- component . _handlers = Object . create ( null ) ;
72
-
70
+ component . _observers = { pre : blankObject ( ) , post : blankObject ( ) } ;
71
+ component . _handlers = blankObject ( ) ;
73
72
component . _root = options . _root || component ;
74
73
component . _yield = options . _yield ;
75
74
component . _bind = options . _bind ;
You can’t perform that action at this time.
0 commit comments