MCPcopy Create free account
hub / github.com/DanWahlin/CustomerManagerStandard / publishCore

Function publishCore

CustomerManager/Scripts/breeze.debug.js:1415–1433  ·  view source on GitHub ↗
(that, data, errorCallback)

Source from the content-addressed store, hash-verified

1413 };
1414
1415 function publishCore(that, data, errorCallback) {
1416 var subscribers = that._subscribers;
1417 if (!subscribers) return true;
1418 // subscribers from outer scope.
1419 subscribers.forEach(function (s) {
1420 try {
1421 s.callback(data);
1422 } catch (e) {
1423 e.context = "unable to publish on topic: " + that.name;
1424 if (errorCallback) {
1425 errorCallback(e);
1426 } else if (that._defaultErrorCallback) {
1427 that._defaultErrorCallback(e);
1428 } else {
1429 fallbackErrorHandler(e);
1430 }
1431 }
1432 });
1433 }
1434
1435 /**
1436 Publish data for this event asynchronously.

Callers 1

breeze.debug.jsFile · 0.85

Calls 1

fallbackErrorHandlerFunction · 0.85

Tested by

no test coverage detected