Commit 1126bdac authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Router: Fix Redirect for command

parent de5bc8ec
......@@ -70,16 +70,14 @@
})
.declareMethod('redirect', function (options) {
if (options !== undefined) {
if (options.toExternal) {
if (options !== undefined && options.toExternal) {
window.location.replace(options.url);
return RSVP.timeout(REDIRECT_TIMEOUT); // timeout if not redirected
}
if (options.newTab) {
if (options !== undefined && options.newTab) {
window.open(options.url, '_blank');
return;
}
}
else {
return this.getCommandUrlFor(options)
.push(function (hash) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment