diff options
author | Teddy Wing | 2015-10-29 20:04:21 -0400 |
---|---|---|
committer | Teddy Wing | 2015-10-29 20:08:10 -0400 |
commit | 6d9efab0dec6119114ceb9c366dc65373d8a0ecd (patch) | |
tree | 60feed290c028e8cb66ec019b1d20c2f8b67efd6 | |
parent | ec7669c3467c07f096ae68bfc9c2b574b6f3df0e (diff) | |
download | vimperator-plugins-6d9efab0dec6119114ceb9c366dc65373d8a0ecd.tar.bz2 |
asdfghjkl.js: Add brackets to multiline function
Fix this error:
Sourcing file failed: ${HOME}/.vimperator/plugin/asdfghjkl.js:101:
SyntaxError: expected expression, got keyword 'let'
That was caused by having a multiline expression in a function without
braces.
(Discovered on Firefox 41.0.2 on Mac OS X 10.8 with Vimperator 3.10.1.)
-rw-r--r-- | asdfghjkl.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/asdfghjkl.js b/asdfghjkl.js index 7826a48..5364305 100644 --- a/asdfghjkl.js +++ b/asdfghjkl.js @@ -97,11 +97,12 @@ let PLUGIN_INFO = xml` function around (obj, name, func) { let next = obj[name]; - obj[name] = function () + obj[name] = function () { let (self = this, args = Array.from(arguments)) func.call(self, function () next.apply(self, args), args); + } } around(events, 'onKeyPress', function (next, [event]) { |