Skip to content

Commit

Permalink
[desk-tool] Gracefully handle when published-mutations arrive a bit l…
Browse files Browse the repository at this point in the history
…ater
  • Loading branch information
judofyr authored and rexxars committed Oct 6, 2020
1 parent 9322b74 commit b87453b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ export class Controller {

currentObjectDiff(): ObjectDiff<any> | null {
const diff = this.currentDiff()
if (diff && diff.type !== 'object') throw new Error(`ObjectDiff expected, got ${diff.type}`)
if (diff) {
if (diff.type === 'null') return null
if (diff.type !== 'object') throw new Error(`ObjectDiff expected, got ${diff.type}`)
}
return diff
}

Expand Down

0 comments on commit b87453b

Please sign in to comment.