diff --git a/mongo-migrations/published-breakpoints.js b/mongo-migrations/published-breakpoints.js index 8af778a63d..c1be36caf7 100644 --- a/mongo-migrations/published-breakpoints.js +++ b/mongo-migrations/published-breakpoints.js @@ -6,6 +6,7 @@ let migrateBreakpoints = () => { print(`updating breakpoints for ${project._id}`); try { const breakpoint = db.Breakpoints.findOne({ _id: project._id }); + if (breakpoint === null) return; breakpoint._id = project.devTreeId; db.Breakpoints.insertOne(breakpoint); db.Breakpoints.remove({ _id: project._id }, true);