Enable lense growing with empty values
This commit is contained in:
parent
be79784b2d
commit
f6b82e22ef
1 changed files with 4 additions and 1 deletions
|
@ -25,7 +25,10 @@ const lense = (methods, extra) => {
|
||||||
if (child) {
|
if (child) {
|
||||||
methods.set(child, value)
|
methods.set(child, value)
|
||||||
return true
|
return true
|
||||||
} else if(prop == target.children.length) {
|
} else {
|
||||||
|
for (let i = target.children.length; i < Number(prop); i++) {
|
||||||
|
target.appendChild(methods.new(undefined))
|
||||||
|
}
|
||||||
const element = methods.new(value)
|
const element = methods.new(value)
|
||||||
target.appendChild(element)
|
target.appendChild(element)
|
||||||
if (methods.get(element) !== value)
|
if (methods.get(element) !== value)
|
||||||
|
|
Loading…
Reference in a new issue