From f3fbffa57d1e181645aefd537b5c92cdc9cd0e9a Mon Sep 17 00:00:00 2001 From: Cyril Auburtin Date: Thu, 4 Dec 2025 09:33:24 +0100 Subject: [PATCH] Update block.js - handle block.get() without a path --- src/block.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/block.js b/src/block.js index 12a800d..586f05d 100644 --- a/src/block.js +++ b/src/block.js @@ -63,7 +63,7 @@ module.exports = class Block { //If an item is missing, check that the section has been loaded if (typeof result === 'undefined' && this.draft) { - const section = path.split('.')[0]; + const section = path?.split('.')[0]; const loadedSections = Object.keys(this.content || {}); if (!loadedSections.includes(section)) {