From e6833010985cb2ab1f739be1b115bea434c28cc1 Mon Sep 17 00:00:00 2001 From: Andreas Karlsson Date: Tue, 4 Aug 2020 13:12:00 +0200 Subject: [PATCH] Make sure story response is an actual story and not just an empty placeholder The response `{ story: false }` stopped page not found from functioning as expected with the former if statement. --- builtin/forStoryblok.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/forStoryblok.ts b/builtin/forStoryblok.ts index 2918c87..c3e97d9 100644 --- a/builtin/forStoryblok.ts +++ b/builtin/forStoryblok.ts @@ -3,7 +3,7 @@ import { Payload } from '../types/Payload' export const forStoryblok = async ({ dispatch }, { url: fullSlug }: Payload) => { fullSlug = fullSlug || 'home' const story = await dispatch(`storyblok/loadStory`, { fullSlug }, { root: true }) - if (story) { + if (story && story.story !== false) { return { name: 'storyblok', params: {