mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Only try to match url if it's needed (#395)
This commit is contained in:
parent
0c328e9bab
commit
03e1f5f833
1 changed files with 5 additions and 2 deletions
|
|
@ -58,8 +58,11 @@ export function addSessionData (uid, data) {
|
|||
data,
|
||||
effect () {
|
||||
const { shell } = getState().sessions.sessions[uid];
|
||||
const url = getURL(shell, data);
|
||||
if (null !== url) {
|
||||
|
||||
const enterKey = Boolean(data.match(/\n/));
|
||||
const url = enterKey ? getURL(shell, data) : null;
|
||||
|
||||
if (url) {
|
||||
dispatch({
|
||||
type: SESSION_URL_SET,
|
||||
uid,
|
||||
|
|
|
|||
Loading…
Reference in a new issue