From 515f1c1ad852a1c4e0bab343aed09cdfa2c0aa27 Mon Sep 17 00:00:00 2001 From: Vitaliy Bobrov Date: Sun, 14 Jan 2018 11:22:25 +0100 Subject: [PATCH] Fix arrow function arguments. --- CHANGELOG.md | 6 +++++- lib/interceptors/directive.js | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bebeb6c..6b790c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,11 @@ +## 0.9.13 +### Bug Fixes: +- Fix arrow function arguments. + ## 0.9.12 ### Bug Fixes: - Update module RegExp, thanks @miluoshi. -- Fix directive strict DI compatability, thanks @miluoshi. +- Fix directive strict DI compatibility, thanks @miluoshi. ## 0.9.11 - Update documentation with notes about inline function inside angular methods declaration. diff --git a/lib/interceptors/directive.js b/lib/interceptors/directive.js index 794e565..dd42dce 100644 --- a/lib/interceptors/directive.js +++ b/lib/interceptors/directive.js @@ -37,8 +37,8 @@ module.exports = function (name, directive) { if (!exists) { this.MODULE_CACHE[cacheKey] = true; - const transformedDirective = () => { - const directive = directiveFn.apply(null, arguments); + const transformedDirective = (...args) => { + const directive = directiveFn.apply(null, args); const transformedDef = transform.call(this, name, directive); directive.controller = transformedDef.controller;