From 62f028d685d23cbd5b73bca69806d3ab3950def2 Mon Sep 17 00:00:00 2001 From: Nils Enevoldsen Date: Thu, 27 Sep 2018 01:07:09 -0400 Subject: [PATCH] Fix error if number is specified but set is not --- modules/ext.scryfallLinks.tooltip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ext.scryfallLinks.tooltip.js b/modules/ext.scryfallLinks.tooltip.js index b3a48d0..0b6d398 100644 --- a/modules/ext.scryfallLinks.tooltip.js +++ b/modules/ext.scryfallLinks.tooltip.js @@ -26,7 +26,7 @@ $( function () { target = thisPopper._reference, jsonURI = new URL( 'https://api.scryfall.com/cards/named' ); var rotationClass = 'ext-scryfall-rotate-0'; - if ( typeof target.dataset.cardNumber === 'undefined' || target.dataset.cardNumber === '' ) { + if ( typeof target.dataset.cardSet === 'undefined' || typeof target.dataset.cardNumber === 'undefined' || target.dataset.cardNumber === '' ) { jsonURI.searchParams.set( 'exact', target.dataset.cardName ); if ( typeof target.dataset.cardSet !== 'undefined' ) { jsonURI.searchParams.set( 'set', target.dataset.cardSet );