Commit b0e7bff4 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Corrige peticiones encadenadas con resultado nulo

parent a3e208df
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -144,6 +144,10 @@ define([
				ids.push(categoryId);
			}

			if (!ids.length) {
				return;
			}

			return this._merge([{
				queryParams: {
					ids: ids
+8 −2
Original line number Diff line number Diff line
@@ -95,9 +95,15 @@ define([
				if (i > 0) {
					dfds[i - 1].then(lang.hitch(this, function(target, queryObj, prevRes) {

						var expandedQueryObj = this._expandQueryWithPreviousResponse(target, queryObj, prevRes),
							reqParams = this._getRequestParams(target, expandedQueryObj);
						var expandedQueryObj = this._expandQueryWithPreviousResponse(target, queryObj, prevRes);

						if (!expandedQueryObj) {
							var dfd = this._responsePromises[target];
							dfd.reject();
							return;
						}

						var reqParams = this._getRequestParams(target, expandedQueryObj);
						this._emitEvt('REQUEST', reqParams);
					}, target, queryObj));
				} else {