Skip to content

Commit

Permalink
fixed redirection issue on ask_question
Browse files Browse the repository at this point in the history
  • Loading branch information
rendoir committed Apr 25, 2018
1 parent 4ed90a5 commit 6a5f049
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ function getUniqueCommentURL(commentable_id, comment_id) {
}

/**
*
* @param {String} message_id
*
* @param {String} message_id
* @param {boolean} show - If true, it's supposed to to 'Show Comments' , if false it's supposed to 'Hide Comments'
*/
function toggleShowMsg(message_id, show) {
Expand Down Expand Up @@ -515,7 +515,7 @@ ajax = __webpack_require__(1);

function created(data) {
var reply = JSON.parse(data.target.response);
window.location.replace("http://localhost:8000/questions/" + reply.id);
window.location = "questions/" + reply.id;
}

function submit() {
Expand Down Expand Up @@ -668,7 +668,7 @@ function addKeyListeners(inputNode, oldNode, comment_id) {
requestEdition(inputNode, oldNode, comment_id);
break;

// ESC was pressed
// ESC was pressed
case 27:
getPreviousComment(inputNode, oldNode);
return;
Expand Down Expand Up @@ -722,4 +722,4 @@ function getPreviousComment(inputNode, previousNode) {
// removed by extract-text-webpack-plugin

/***/ })
/******/ ]);
/******/ ]);
4 changes: 2 additions & 2 deletions resources/assets/js/questions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ajax = require("./ajax.js");

function created(data){
let reply = JSON.parse(data.target.response)
window.location.replace("http://localhost:8000/questions/" + reply.id);
window.location = "questions/" + reply.id;
}

function submit() {
Expand All @@ -13,4 +13,4 @@ function submit() {

module.exports = {
submit
};
};

0 comments on commit 6a5f049

Please sign in to comment.