From e2fe5c7bb05fb959af4285a8dc383ab7f461b200 Mon Sep 17 00:00:00 2001 From: David Vargas Date: Sun, 13 Aug 2023 17:47:00 -0400 Subject: [PATCH] TextContent error (#141) * textContent error * 1.10.8 --- package-lock.json | 4 ++-- package.json | 2 +- src/utils/runQueryTools.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index dda39624..6dfffaf0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "query-builder", - "version": "1.10.7", + "version": "1.10.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "query-builder", - "version": "1.10.7", + "version": "1.10.8", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 2e0e4edc..eb3e5685 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "query-builder", - "version": "1.10.7", + "version": "1.10.8", "description": "Introduces new user interfaces for building queries in Roam", "main": "./build/main.js", "author": { diff --git a/src/utils/runQueryTools.ts b/src/utils/runQueryTools.ts index b89a52b6..ae712f18 100644 --- a/src/utils/runQueryTools.ts +++ b/src/utils/runQueryTools.ts @@ -133,7 +133,7 @@ const runQueryTools = (extensionAPI: OnloadArgs["extensionAPI"]) => { const bTitle = (b.getElementsByClassName( "rm-ref-page-view-title" )[0] || b.querySelector(".rm-zoom-item-content")) as HTMLDivElement; - return sortBy(aTitle.textContent || "", bTitle.textContent || ""); + return sortBy(aTitle?.textContent || "", bTitle?.textContent || ""); }); refsInView.forEach((r) => refContainer.appendChild(r)); }