Skip to content

Commit

Permalink
Added missing backtick quotes.
Browse files Browse the repository at this point in the history
Thanks to xet7 !
  • Loading branch information
xet7 committed Jan 28, 2021
1 parent cf9b482 commit bf7b178
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/boards.js
Original file line number Diff line number Diff line change
Expand Up @@ -1263,12 +1263,12 @@ function boardRemover(userId, doc) {
}

Boards.uniqueTitle = title => {
const m = title.match(/^(?<title>.*?)\s*(\[(?<num>\d+)]\s*$|\s*$)/);
const m = title.match(`/^(?<title>.*?)\s*(\[(?<num>\d+)]\s*$|\s*$)/`);
const base = escapeForRegex(m.groups.title);
let num = 0;
Boards.find({ title: new RegExp(`^${base}\\s*\\[\\d+]\\s*$`) }).forEach(
board => {
const m = board.title.match(/^(?<title>.*?)\s*\[(?<num>\d+)]\s*$/);
const m = board.title.match(`/^(?<title>.*?)\s*\[(?<num>\d+)]\s*$/`);
if (m) {
const n = parseInt(m.groups.num, 10);
num = num < n ? n : num;
Expand Down

0 comments on commit bf7b178

Please sign in to comment.