File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -132,10 +132,10 @@ if (typeof Set !== 'undefined' && isNative(Set)) {
132
132
this . set = Object . create ( null )
133
133
}
134
134
has ( key : string | number ) {
135
- return this . set [ key ] !== undefined
135
+ return this . set [ key ] === true
136
136
}
137
137
add ( key : string | number ) {
138
- this . set [ key ] = 1
138
+ this . set [ key ] = true
139
139
}
140
140
clear ( ) {
141
141
this . set = Object . create ( null )
Original file line number Diff line number Diff line change @@ -202,7 +202,11 @@ export function createPatchFunction (backend) {
202
202
203
203
function insert ( parent , elm , ref ) {
204
204
if ( parent ) {
205
- nodeOps . insertBefore ( parent , elm , ref )
205
+ if ( ref ) {
206
+ nodeOps . insertBefore ( parent , elm , ref )
207
+ } else {
208
+ nodeOps . appendChild ( parent , elm )
209
+ }
206
210
}
207
211
}
208
212
Original file line number Diff line number Diff line change @@ -19,9 +19,6 @@ export function createComment (text) {
19
19
}
20
20
21
21
export function insertBefore ( node , target , before ) {
22
- if ( ! before ) {
23
- return appendChild ( node , target )
24
- }
25
22
if ( target . nodeType === 3 ) {
26
23
if ( node . type === 'text' ) {
27
24
node . setAttr ( 'value' , target . text )
You can’t perform that action at this time.
0 commit comments