diff --git a/package-lock.json b/package-lock.json index 489a2e64..17508419 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "query-builder", - "version": "1.7.6", + "version": "1.7.7", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "query-builder", - "version": "1.7.6", + "version": "1.7.7", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 3add7dcc..d0975961 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "query-builder", - "version": "1.7.6", + "version": "1.7.7", "description": "Introduces new user interfaces for building queries in Roam", "main": "./build/main.js", "author": { diff --git a/src/utils/isDiscourseNode.ts b/src/utils/isDiscourseNode.ts index 01ccaaa8..159a9e43 100644 --- a/src/utils/isDiscourseNode.ts +++ b/src/utils/isDiscourseNode.ts @@ -1,7 +1,10 @@ import getDiscourseNodes from "./getDiscourseNodes"; import findDiscourseNode from "./findDiscourseNode"; -const isDiscourseNode = (uid?: string, nodes = getDiscourseNodes()) => - !!findDiscourseNode(uid, nodes); +const isDiscourseNode = (uid?: string, nodes = getDiscourseNodes()) => { + const node = findDiscourseNode(uid, nodes); + if (!node) return false; + return node.backedBy !== "default"; +}; export default isDiscourseNode;