Explorar o código

fix: Songs regex filter using splice not slice function

Owen Diffey %!s(int64=3) %!d(string=hai) anos
pai
achega
39909f4bfd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      backend/logic/songs.js

+ 1 - 1
backend/logic/songs.js

@@ -228,7 +228,7 @@ class _SongsModule extends CoreClass {
 				const { data, filter, filterType } = query;
 				const newQuery = {};
 				if (filterType === "regex") {
-					newQuery[filter.property] = new RegExp(`${data.splice(1, data.length - 1)}`, "i");
+					newQuery[filter.property] = new RegExp(`${data.slice(1, data.length - 1)}`, "i");
 				} else if (filterType === "contains") {
 					newQuery[filter.property] = new RegExp(`${data.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&")}`, "i");
 				} else if (filterType === "exact") {