mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-25 08:06:51 +00:00
Add number node
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user