From d6a6931d2a761763549b4fcb2329d34cf36f017d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Schormu=CC=88ller?= Date: Thu, 18 Apr 2019 13:58:54 +0200 Subject: [PATCH] Fixture for TypeError: fn.apply is not a function Fix like https://github.com/SortableJS/meteor-sortablejs/issues/10 --- assets/tracer.js | 6 +++++- assets/zone.js | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/assets/tracer.js b/assets/tracer.js index fa57884..fbb517c 100644 --- a/assets/tracer.js +++ b/assets/tracer.js @@ -160,7 +160,11 @@ extendZone({ if(ownerInfo) { zone.setOwnerArgs(validateArgs(this, arguments)); } - return zone.run(func, this, arguments); + + // donĀ“t run if callback is a object + if (typeof func !== "object") { + return zone.run(func, this, arguments); + } }; }, diff --git a/assets/zone.js b/assets/zone.js index a39edce..4e765ee 100644 --- a/assets/zone.js +++ b/assets/zone.js @@ -221,7 +221,8 @@ function apply() { 'prompt' ]); - eventTargetPatch.apply(); + // disabled becouse this let not apply event functions anymore (e.g. sortablejs) + // eventTargetPatch.apply(); propertyDescriptorPatch.apply();