Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Commit

Permalink
5.0.3 (bug fix)
Browse files Browse the repository at this point in the history
- Fixes a json parsing issue
  • Loading branch information
theusaf committed Jan 26, 2021
1 parent b7c43c5 commit df85f40
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions kahoot.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ if(!fs.existsSync(path.join(mainPath,"keys.json")) || +(fs.readFileSync(path.joi
function ReadItem(item){
return new Promise(function(resolve, reject) {
fs.readFile(path.join(mainPath,"json-full",item),"utf8",(err,data)=>{
if(err){reject();}
if(err){return reject();}
resolve(JSON.parse(data));
});
});
Expand Down Expand Up @@ -591,8 +591,13 @@ class QuizFinder{
}
if(!this.parent.options.uuid){
const searchText = (this.parent.options.searchTerm ? edit(this.parent.options.searchTerm) : ""),
len = this.parent.kahoot.quiz.quizQuestionAnswers.length,
len = this.parent.kahoot.quiz.quizQuestionAnswers.length;
let keys = {};
try{
keys = await ReadItem("../keys.json");
}catch(e){
console.log("Could not get keys",e);
}
if((searchText.replace(/\s\*/g,"")) === ""){
if(!this.hax.noQuiz){
this.hax.noQuiz = true;
Expand Down

0 comments on commit df85f40

Please sign in to comment.