We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d939a74 commit 80fbf61Copy full SHA for 80fbf61
api/workers/jobProcessors/buildTasksScheduler.js
@@ -28,9 +28,12 @@ async function buildTasksScheduler(job) {
28
const tasksToQueue = await Promise.all(
29
siteBuildTasks.map(async (siteBuildTask) => {
30
// always use the branch config with site context
31
- const { branch } = siteBuildTask.Site.SiteBranchConfigs.find(
32
- (sbc) => sbc.context === 'site',
33
- );
+ const { branch } =
+ siteBuildTask.Site?.SiteBranchConfigs?.find((sbc) => sbc.context === 'site') ||
+ {};
34
+
35
+ if (!branch) return Promise.resolve(null);
36
37
// find the latest build matching this branch
38
// https://github.com/sequelize/sequelize/issues/7665
39
const builds = await Build.findAll({
0 commit comments