mirror of
https://github.com/xvvvyz/tilde.git
synced 2026-03-11 14:44:24 +00:00
if/else -> ternary
This commit is contained in:
parent
0c596f60f0
commit
92f4872ea7
1 changed files with 2 additions and 5 deletions
|
|
@ -240,11 +240,8 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
if (q.match(new RegExp(urlRegex))) {
|
||||
redirect = q;
|
||||
} else {
|
||||
redirect = config.defaultCommand + encodeURIComponent(q);
|
||||
}
|
||||
redirect = q.match(new RegExp(urlRegex)) ? q
|
||||
: config.defaultCommand + encodeURIComponent(q);
|
||||
|
||||
config.commands.forEach(function(command) {
|
||||
if (qSplit[0] === command.key) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue