mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-15 21:28:40 -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,
|
data,
|
||||||
effect () {
|
effect () {
|
||||||
const { shell } = getState().sessions.sessions[uid];
|
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({
|
dispatch({
|
||||||
type: SESSION_URL_SET,
|
type: SESSION_URL_SET,
|
||||||
uid,
|
uid,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue