From 01c8013309f2ea849f056dc8335d736cfbb6d57d Mon Sep 17 00:00:00 2001 From: ISO-B <3048685+ISO-B@users.noreply.github.com> Date: Tue, 4 Jan 2022 14:41:34 +0200 Subject: [PATCH] Changed replaceAll to replace since node12 doent' have it --- server/objects/Book.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/objects/Book.js b/server/objects/Book.js index f8661eeb..caef8a04 100644 --- a/server/objects/Book.js +++ b/server/objects/Book.js @@ -278,9 +278,9 @@ class Book { // var authorMatch = this._author.toLowerCase().includes(search) var seriesMatch = this._series.toLowerCase().includes(search) - + // ISBN match has to be exact to prevent isbn matches to flood results. Remove dashes since isbn might have those - var isbnMatch = this.isbn.toLowerCase().replaceAll('-', '') === search.replaceAll('-', '') + var isbnMatch = this.isbn.toLowerCase().replace(/-/g, '') === search.replace(/-/g, '') var bookMatchKey = titleMatch ? 'title' : subtitleMatch ? 'subtitle' : authorsMatched.length ? 'authorFL' : seriesMatch ? 'series' : isbnMatch ? 'isbn' : false