浏览代码

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") {