mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Bugfix: canExecute not a function
Bugfix: _scopes.all is undefined
This commit is contained in:
parent
bc64fe6d0d
commit
f673344408
2 changed files with 4 additions and 2 deletions
|
|
@ -324,7 +324,7 @@ function decorateKoCommands(thisArg, commands) {
|
||||||
Object.entries(commands).forEach(([key, canExecute]) => {
|
Object.entries(commands).forEach(([key, canExecute]) => {
|
||||||
let command = thisArg[key],
|
let command = thisArg[key],
|
||||||
fn = function(...args) {
|
fn = function(...args) {
|
||||||
if (fn.enabled() && canExecute.call(thisArg, thisArg)) {
|
if (fn.enabled() && fn.canExecute()) {
|
||||||
command.apply(thisArg, args);
|
command.apply(thisArg, args);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,9 @@
|
||||||
const
|
const
|
||||||
doc = document,
|
doc = document,
|
||||||
meta = /Mac OS X/.test(navigator.userAgent) ? 'meta' : 'ctrl',
|
meta = /Mac OS X/.test(navigator.userAgent) ? 'meta' : 'ctrl',
|
||||||
_scopes = {},
|
_scopes = {
|
||||||
|
all: {}
|
||||||
|
},
|
||||||
toArray = v => Array.isArray(v) ? v : v.split(/\s*,\s*/),
|
toArray = v => Array.isArray(v) ? v : v.split(/\s*,\s*/),
|
||||||
|
|
||||||
keydown = event => {
|
keydown = event => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue