Add number node

This commit is contained in:
Misode
2020-05-26 02:08:36 +02:00
parent 387218193e
commit abbbc0bbfa
10 changed files with 57 additions and 12 deletions

View File

@@ -21,6 +21,7 @@ export class DataModel {
}
invalidate() {
console.log(this.data)
this.listeners.forEach(listener => listener.invalidated(this))
}
@@ -35,7 +36,7 @@ export class DataModel {
console.log('Set', path.toString(), JSON.stringify(value))
if (value === undefined) {
if (value === undefined || (typeof value === 'number' && isNaN(value))) {
if (typeof path.last() === 'number') {
node.splice(path.last(), 1)
} else {