From 41e19ef949f739bdb8e3593e108e9271fa1bbc10 Mon Sep 17 00:00:00 2001 From: Zachatoo Date: Fri, 19 Jan 2024 21:27:47 -0700 Subject: [PATCH 1/2] fix: uncaught exception when cancelling prompt when creating note from template and `throw_on_cancel` is true refs: #1294 --- src/core/functions/internal_functions/system/PromptModal.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/functions/internal_functions/system/PromptModal.ts b/src/core/functions/internal_functions/system/PromptModal.ts index 77639193..d9ad7fa5 100644 --- a/src/core/functions/internal_functions/system/PromptModal.ts +++ b/src/core/functions/internal_functions/system/PromptModal.ts @@ -1,4 +1,3 @@ -import { TemplaterError } from "utils/Error"; import { ButtonComponent, Modal, @@ -6,6 +5,7 @@ import { TextAreaComponent, TextComponent, } from "obsidian"; +import { TemplaterError } from "utils/Error"; export class PromptModal extends Modal { private resolve: (value: string) => void; @@ -29,9 +29,7 @@ export class PromptModal extends Modal { onClose(): void { this.contentEl.empty(); if (!this.submitted) { - // TOFIX: for some reason throwing TemplaterError on iOS causes the app to freeze. - // this.reject(new TemplaterError("Cancelled prompt")); - this.reject(); + this.reject(new TemplaterError("Cancelled prompt")); } } From 6e7cf116145c7f41dc622b190fa5b471217f14d9 Mon Sep 17 00:00:00 2001 From: Zachatoo Date: Fri, 19 Jan 2024 21:54:12 -0700 Subject: [PATCH 2/2] chore(release): 1.18.4 --- CHANGELOG.md | 7 +++++++ manifest.json | 2 +- package.json | 2 +- versions.json | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 575f2144..e22f2af9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.18.4](https://github.com/SilentVoid13/Templater/compare/1.18.3...1.18.4) (2024-01-20) + + +### Bug Fixes + +* uncaught exception when cancelling prompt when creating note from template and `throw_on_cancel` is true ([41e19ef](https://github.com/SilentVoid13/Templater/commit/41e19ef949f739bdb8e3593e108e9271fa1bbc10)), closes [#1294](https://github.com/SilentVoid13/Templater/issues/1294) + ### [1.18.3](https://github.com/SilentVoid13/Templater/compare/1.18.2...1.18.3) (2023-12-02) diff --git a/manifest.json b/manifest.json index c9404c9a..d8d8d21b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "templater-obsidian", "name": "Templater", - "version": "1.18.3", + "version": "1.18.4", "description": "Create and use templates", "minAppVersion": "0.11.13", "author": "SilentVoid", diff --git a/package.json b/package.json index 90fb9543..de62aa92 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "templater-obsidian", - "version": "1.18.3", + "version": "1.18.4", "description": "Create and use templates", "main": "main.js", "scripts": { diff --git a/versions.json b/versions.json index b19c4a65..7bf92740 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,5 @@ { + "1.18.4": "0.13.19", "1.18.3": "0.13.19", "1.18.2": "0.13.19", "1.18.1": "0.13.19",