Skip to content

Commit

Permalink
Use toString()
Browse files Browse the repository at this point in the history
  • Loading branch information
jdneo committed Oct 7, 2019
1 parent f647753 commit 1051cca
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,8 @@ core.getProblem = function(keyword, cb) {
this.getProblems(function(e, problems) {
if (e) return cb(e);

// keyword = Number(keyword) || keyword;
// const metaFid = file.exist(keyword) ? Number(file.meta(keyword).id) : NaN;
const problem = problems.find(function(x) {
return x.fid === keyword || x.name === keyword || x.slug === keyword;
return x.fid.toStirng() === keyword || x.name === keyword || x.slug === keyword;
});
if (!problem) return cb('Problem not found!');
core.next.getProblem(problem, cb);
Expand Down

0 comments on commit 1051cca

Please sign in to comment.