Fossil SCM

Fixed a recursion bug in fossil.dom.append(e,array) (currently unused, but will be soon).

drh 2020-08-16 15:51 trunk
Commit 2018954b3f122599cd91f100fc4bd82aa9c1d1019f730c9c55cfc2e8e9443e43
1 file changed +4 -2
--- src/fossil.dom.js
+++ src/fossil.dom.js
@@ -218,14 +218,16 @@
218218
const a = argsToArray(arguments);
219219
a.shift();
220220
for(let i in a) {
221221
var e = a[i];
222222
if(isArray(e) || e.forEach){
223
- e.forEach((x)=>f.call(this, parent,e));
223
+ e.forEach((x)=>f.call(this, parent,x));
224224
continue;
225225
}
226
- if('string'===typeof e || 'number'===typeof e) e = this.text(e);
226
+ if('string'===typeof e
227
+ || 'number'===typeof e
228
+ || 'boolean'===typeof e) e = this.text(e);
227229
parent.appendChild(e);
228230
}
229231
return parent;
230232
};
231233
232234
--- src/fossil.dom.js
+++ src/fossil.dom.js
@@ -218,14 +218,16 @@
218 const a = argsToArray(arguments);
219 a.shift();
220 for(let i in a) {
221 var e = a[i];
222 if(isArray(e) || e.forEach){
223 e.forEach((x)=>f.call(this, parent,e));
224 continue;
225 }
226 if('string'===typeof e || 'number'===typeof e) e = this.text(e);
 
 
227 parent.appendChild(e);
228 }
229 return parent;
230 };
231
232
--- src/fossil.dom.js
+++ src/fossil.dom.js
@@ -218,14 +218,16 @@
218 const a = argsToArray(arguments);
219 a.shift();
220 for(let i in a) {
221 var e = a[i];
222 if(isArray(e) || e.forEach){
223 e.forEach((x)=>f.call(this, parent,x));
224 continue;
225 }
226 if('string'===typeof e
227 || 'number'===typeof e
228 || 'boolean'===typeof e) e = this.text(e);
229 parent.appendChild(e);
230 }
231 return parent;
232 };
233
234

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button