Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromvuejs/vue

Commit28ec3c7

Browse files
committed
minor tweaks
1 parentd2f7f19 commit28ec3c7

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

‎src/core/util/env.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ if (typeof Set !== 'undefined' && isNative(Set)) {
132132
this.set=Object.create(null)
133133
}
134134
has(key:string|number){
135-
returnthis.set[key]!==undefined
135+
returnthis.set[key]===true
136136
}
137137
add(key:string|number){
138-
this.set[key]=1
138+
this.set[key]=true
139139
}
140140
clear(){
141141
this.set=Object.create(null)

‎src/core/vdom/patch.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,11 @@ export function createPatchFunction (backend) {
202202

203203
functioninsert(parent,elm,ref){
204204
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+
}
206210
}
207211
}
208212

‎src/platforms/weex/runtime/node-ops.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ export function createComment (text) {
1919
}
2020

2121
exportfunctioninsertBefore(node,target,before){
22-
if(!before){
23-
returnappendChild(node,target)
24-
}
2522
if(target.nodeType===3){
2623
if(node.type==='text'){
2724
node.setAttr('value',target.text)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp