diff --git a/lib/index.js b/lib/index.js index c4d5793..f9814d0 100644 --- a/lib/index.js +++ b/lib/index.js @@ -13,6 +13,11 @@ export const useStoryblokBridge = (id, cb, options = {}) => { return; } + if (!id) { + console.warn("Story ID is not defined. Please provide a valid ID."); + return; + } + window.storyblokRegisterEvent(() => { const sbBridge = new window.StoryblokBridge(options);