ソースを参照

fix: Songs regex filter using splice not slice function

Owen Diffey 3 年 前
コミット
39909f4bfd
1 ファイル変更1 行追加1 行削除
  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") {