aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2015-10-29 20:15:42 -0400
committerTeddy Wing2015-10-29 20:15:42 -0400
commite8ca6f7a63149ce9125bb5e7660409e2fc4978ef (patch)
tree8820f38d1638f1f096fa6fb909f33a8df699ff78
parent6d9efab0dec6119114ceb9c366dc65373d8a0ecd (diff)
downloadvimperator-plugins-e8ca6f7a63149ce9125bb5e7660409e2fc4978ef.tar.bz2
asdfghjkl.js: Remove `let` blockasdfghjkl--fix-block-syntax-errors
`let` blocks of the form let (var1 [= value1] [, var2 [= value2]] [, ..., varN [= valueN]]) block; are non-standard, as specified in the following sections of the Mozilla Developer Network page on `let`: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#Non-standard_let_extensions https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#let_blocks Removing the `let` block here for forward compatibility. This change also gets rid of the `self` variable created inside the `let` block, using an arrow function instead to obviate the need to save a `this` reference.
-rw-r--r--asdfghjkl.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/asdfghjkl.js b/asdfghjkl.js
index 5364305..d2bfc8f 100644
--- a/asdfghjkl.js
+++ b/asdfghjkl.js
@@ -98,10 +98,10 @@ let PLUGIN_INFO = xml`
function around (obj, name, func) {
let next = obj[name];
obj[name] = function () {
- let (self = this, args = Array.from(arguments))
- func.call(self,
- function () next.apply(self, args),
- args);
+ let args = Array.from(arguments);
+ func.call(this,
+ () => next.apply(this, args),
+ args);
}
}