From f775df9e9ca2ac8c1f02875842c5538827c19352 Mon Sep 17 00:00:00 2001 From: Francisco Dans Date: Wed, 15 Apr 2015 14:53:10 +0200 Subject: [PATCH] only runs callback if it's been defined --- lib/torque/provider/windshaft.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/torque/provider/windshaft.js b/lib/torque/provider/windshaft.js index 7093cf4..3b21fdc 100644 --- a/lib/torque/provider/windshaft.js +++ b/lib/torque/provider/windshaft.js @@ -460,7 +460,7 @@ map_instance_time.end(); if (data) { if (data.errors){ - self.options.errorCallback(data.errors); + self.options.errorCallback && self.options.errorCallback(data.errors); return; } var torque_key = Object.keys(data.metadata.torque)[0]