Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

skip when breakpoint isn't found over project, it must created by newer version

Oleg Isonenfa2bec7f064e
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);