Merge pull request #3602 from FreeCodeCamp/fix/share-able-url-solution-undefined
fix shareable challenges solution undefinedpull/3571/merge
commit
9bce039e7a
|
@ -267,12 +267,13 @@ module.exports = function(app) {
|
|||
}
|
||||
|
||||
if (dasherize(challenge.name) !== origChallengeName) {
|
||||
return Observable.just(
|
||||
'/challenges/' +
|
||||
dasherize(challenge.name) +
|
||||
'?solution=' +
|
||||
encodeURIComponent(solutionCode)
|
||||
);
|
||||
let redirectUrl = `/challenges/${dasherize(challenge.name)}`;
|
||||
|
||||
if (solutionCode) {
|
||||
redirectUrl += `?solution=${encodeURIComponent(solutionCode)}`;
|
||||
}
|
||||
|
||||
return Observable.just(redirectUrl);
|
||||
}
|
||||
|
||||
// save user does nothing if user does not exist
|
||||
|
|
Loading…
Reference in New Issue