checks querydata

This commit is contained in:
Francisco Dans 2015-08-04 16:09:43 +02:00
parent 3a06914cc2
commit efcfc13546

View File

@ -472,7 +472,7 @@ var Profiler = require('../profiler');
torque.net.jsonp(url, function (data) {
var query = format("select * from ({sql}) __torque_wrap_sql limit 0", { sql: self.getSQL() });
self.sql(query, function (queryData) {
if (data) {
if (data && queryData) {
callback({
updated_at: data.last_updated,
fields: queryData.fields