From 50072d24fbc4d09c67b68d0645c1bf0a5e8df40a Mon Sep 17 00:00:00 2001 From: DorkmasterFlek Date: Thu, 9 Feb 2023 16:30:13 -0500 Subject: [PATCH] Fix tilde card name replacement The tilde replacement for card name doesn't work if the "{cardname}" tag isn't present because the if condition is incorrect. This fixes the condition to check for either one. --- js/creator-23.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/creator-23.js b/js/creator-23.js index cef6192e..1205d5df 100644 --- a/js/creator-23.js +++ b/js/creator-23.js @@ -2286,7 +2286,7 @@ function writeText(textObject, targetContext) { rawText = params.get('copyright'); //so people using CC for custom card games without WotC's IP can customize their copyright info if (rawText == 'none') { rawText = ''; } } - if (rawText.toLowerCase().includes('{cardname}' || '~')) { + if (rawText.toLowerCase().includes('{cardname}') || rawText.toLowerCase().includes('~')) { rawText = rawText.replace(/{cardname}|~/ig, getCardName()); } if (document.querySelector('#info-artist').value == '') {