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

Router: Fix Redirect for command

parent de5bc8ec
...@@ -70,15 +70,13 @@ ...@@ -70,15 +70,13 @@
}) })
.declareMethod('redirect', function (options) { .declareMethod('redirect', function (options) {
if (options !== undefined) { if (options !== undefined && options.toExternal) {
if (options.toExternal) { window.location.replace(options.url);
window.location.replace(options.url); return RSVP.timeout(REDIRECT_TIMEOUT); // timeout if not redirected
return RSVP.timeout(REDIRECT_TIMEOUT); // timeout if not redirected }
} if (options !== undefined && options.newTab) {
if (options.newTab) { window.open(options.url, '_blank');
window.open(options.url, '_blank'); return;
return;
}
} }
else { else {
return this.getCommandUrlFor(options) return this.getCommandUrlFor(options)
......
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