comprodls-sdk 2.81.0 → 2.83.0-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2369,12 +2369,7 @@ function deleteAssignedPath(options) {
|
|
|
2369
2369
|
item_type: 'string', //mandatory, ['dls-internal','external']
|
|
2370
2370
|
dls_product_code: 'string' //mandatory only if item_type is 'dls-internal'
|
|
2371
2371
|
}
|
|
2372
|
-
]
|
|
2373
|
-
"rules": {}, // Optional
|
|
2374
|
-
"context": { // Optional (Needed for system event only)
|
|
2375
|
-
"bundle-code": "string",
|
|
2376
|
-
"space_key": "string"
|
|
2377
|
-
}
|
|
2372
|
+
]
|
|
2378
2373
|
}
|
|
2379
2374
|
}
|
|
2380
2375
|
*/
|
|
@@ -292,6 +292,13 @@ module.exports = function () {
|
|
|
292
292
|
starttime: _startTimestampForPolling,
|
|
293
293
|
endtime: Date.now()
|
|
294
294
|
};
|
|
295
|
+
|
|
296
|
+
// Safe check to avoid poll for events if the channel name or start time is not set
|
|
297
|
+
// This handles an edge condition where the clearTimeout doesn't work as expected
|
|
298
|
+
if (!params.channelname || !params.starttime) {
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
|
|
295
302
|
var requestAPI = request.get(_userOptions.pollingEndpoint).query(params);
|
|
296
303
|
|
|
297
304
|
requestAPI
|
|
@@ -348,7 +355,9 @@ module.exports = function () {
|
|
|
348
355
|
}
|
|
349
356
|
|
|
350
357
|
// Set timeout for next poll
|
|
351
|
-
|
|
358
|
+
if (timeoutDelay) {
|
|
359
|
+
_setTimeoutIDForPolling = setTimeout(_pollForEvents, timeoutDelay);
|
|
360
|
+
}
|
|
352
361
|
}
|
|
353
362
|
});
|
|
354
363
|
};
|
package/package.json
CHANGED