From 0b8d7e5343c2304116c0bf876a572143649f9345 Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Fri, 24 Jun 2016 01:11:26 +0200 Subject: [PATCH] Minor. --- src/_h5ai/public/js/lib/core/location.js | 7 +++---- src/_h5ai/public/js/lib/main/info.js | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/_h5ai/public/js/lib/core/location.js b/src/_h5ai/public/js/lib/core/location.js index 17903e51..f7813cf1 100644 --- a/src/_h5ai/public/js/lib/core/location.js +++ b/src/_h5ai/public/js/lib/core/location.js @@ -1,14 +1,13 @@ -const {win, lo} = require('../globals'); +const {win} = require('../globals'); const {request} = require('../server'); const allsettings = require('./settings'); const event = require('./event'); +const notification = require('../view/notification'); const each = (obj, fn) => Object.keys(obj).forEach(key => fn(obj[key], key)); const values = obj => Object.keys(obj).map(key => obj[key]); const isFn = x => typeof x === 'function'; -const difference = (...args) => lo.difference(...args); - -const notification = require('../view/notification'); +const difference = (arr1, arr2) => arr1.filter(x => arr2.indexOf(x) < 0); const doc = win.document; const settings = Object.assign({ diff --git a/src/_h5ai/public/js/lib/main/info.js b/src/_h5ai/public/js/lib/main/info.js index 61f9a52c..22e2ce3c 100644 --- a/src/_h5ai/public/js/lib/main/info.js +++ b/src/_h5ai/public/js/lib/main/info.js @@ -150,8 +150,8 @@ const onLogout = () => { }).then(reload); }; -const onKeydown = event => { - if (event.which === 13) { +const onKeydown = ev => { + if (ev.which === 13) { onLogin(); } };