Fix InstanceCheck/CordovaCheck transformers

This commit is contained in:
Ibby Hadeed 2017-12-28 08:54:28 -05:00
parent 6416395727
commit 11a1cc2ff5
No known key found for this signature in database
GPG Key ID: 1CA08EB11DAAA786

View File

@ -26,7 +26,8 @@ function getMethodBlock(method: ts.MethodDeclaration, decoratorName: string, dec
switch (decoratorName) {
case 'CordovaCheck':
case 'InstanceCheck':
return ts.createImmediatelyInvokedFunctionExpression([ts.createIf(
// TODO remove function wrapper
return ts.createImmediatelyInvokedArrowFunction([ts.createIf(
ts.createBinary(
ts.createCall(ts.createIdentifier(decoratorMethod), undefined, [ts.createThis()]),
ts.SyntaxKind.EqualsEqualsEqualsToken,