Skip to content

Commit

Permalink
fix bug where answers are stripped form DSL
Browse files Browse the repository at this point in the history
  • Loading branch information
upthebuzzard committed Mar 18, 2017
1 parent a38d0e1 commit ab559ae
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/js/crossword_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,12 +564,13 @@
if (crossword.errors.length > 0) {
specTextWithoutAnswers = crossword.errors.join("\n");
} else {
let spec = generateSpec(crossword);
crossword.spec = spec;
let specWithAnswers = generateSpec(crossword);
crossword.spec = specWithAnswers;
specTextWithAnswers = JSON.stringify(specWithAnswers);

specTextWithAnswers = JSON.stringify(spec);
delete spec['answers'];
specTextWithoutAnswers = JSON.stringify(spec);
let specWithoutAnswers = generateSpec(crossword);
delete specWithoutAnswers['answers'];
specTextWithoutAnswers = JSON.stringify(specWithoutAnswers);
}
crossword.specTextWithAnswers = specTextWithAnswers;
crossword.specTextWithoutAnswers = specTextWithoutAnswers;
Expand Down

0 comments on commit ab559ae

Please sign in to comment.