Skip to content

Commit

Permalink
Merge pull request #18 from bergie/patch-1
Browse files Browse the repository at this point in the history
Safety when receiving meta deltas
  • Loading branch information
xbgmsharp authored Feb 15, 2023
2 parents 97945c6 + cd0a447 commit 8bbf8bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@ module.exports = function(app) {
}

function processDelta(data) {
if (!data.updates || !data.updates.length || !data.updates[0].values || !data.updates[0].values.length) {
return;
}
let dict = data.updates[0].values[0];
let path = dict.path;
let value = dict.value;
Expand Down

0 comments on commit 8bbf8bd

Please sign in to comment.