aboutsummaryrefslogtreecommitdiff
path: root/ext/js/data/anki-util.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-02-27 07:23:42 -0500
committerGitHub <noreply@github.com>2024-02-27 12:23:42 +0000
commite47a0f488f3d9bbcb76ebcf4f5afe203c1ee06c0 (patch)
tree35a4a7411dd3154b19316b330c4976f291f021d2 /ext/js/data/anki-util.js
parente74fadc5a411e907da088729ea13e23e6f5aa58d (diff)
Object utilities (#729)
* Create utilities * Rename old isObject * Use new isObject * Remove old function * Add additional function * Simplify for now * Rename function for clarity * Rename function * Expand type * Update eslint
Diffstat (limited to 'ext/js/data/anki-util.js')
-rw-r--r--ext/js/data/anki-util.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/js/data/anki-util.js b/ext/js/data/anki-util.js
index 123e5d2f..eea3fb8b 100644
--- a/ext/js/data/anki-util.js
+++ b/ext/js/data/anki-util.js
@@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import {isObject} from '../core/utilities.js';
+import {isObjectNotArray} from '../core/object-utilities.js';
/** @type {RegExp} @readonly */
const markerPattern = /\{([\w-]+)\}/g;
@@ -74,7 +74,7 @@ export function cloneFieldMarkerPattern(global) {
* @returns {boolean} `true` if the note is valid, `false` otherwise.
*/
export function isNoteDataValid(note) {
- if (!isObject(note)) { return false; }
+ if (!isObjectNotArray(note)) { return false; }
const {fields, deckName, modelName} = note;
return (
typeof deckName === 'string' &&