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) {
|
if (dasherize(challenge.name) !== origChallengeName) {
|
||||||
return Observable.just(
|
let redirectUrl = `/challenges/${dasherize(challenge.name)}`;
|
||||||
'/challenges/' +
|
|
||||||
dasherize(challenge.name) +
|
if (solutionCode) {
|
||||||
'?solution=' +
|
redirectUrl += `?solution=${encodeURIComponent(solutionCode)}`;
|
||||||
encodeURIComponent(solutionCode)
|
}
|
||||||
);
|
|
||||||
|
return Observable.just(redirectUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// save user does nothing if user does not exist
|
// save user does nothing if user does not exist
|
||||||
|
|
Loading…
Reference in New Issue