src/Common/Core/CompositeClosureHelper/index.js
function flushDataToListener(dataListener, dataChanged) {
    try {
      if (dataListener) {
        const dataToForward = dataHandler.get(
          model[dataContainerName],
          dataListener.request,
          dataChanged
        );
        if (
          dataToForward &&
          (JSON.stringify(dataToForward) !== dataListener.request.lastPush ||
            dataListener.request.metadata.forceFlush)
        ) {
          dataListener.request.lastPush = JSON.stringify(dataToForward);
          dataListener.onDataReady(dataToForward);
        }
      }
    } catch (err) {
      console.log(`flush ${dataName} error caught:`, err);
    }
  }
function flushDataToListener(dataListener, dataChanged) {
    try {
      if (dataListener) {
        const dataToForward = dataHandler.get(
          model[dataContainerName],
          dataListener.request,
          dataChanged
        );
        if (
          dataToForward &&
          (JSON.stringify(dataToForward) !== dataListener.request.lastPush ||
            dataListener.request.metadata.forceFlush)
        ) {
          dataListener.request.lastPush = JSON.stringify(dataToForward);
          dataListener.onDataReady(dataToForward);
        }
      }
    } catch (err) {
      console.log(`flush ${dataName} error caught:`, err);
    }
  }
function flushDataToListener ( dataListener , dataChanged ) { try { if ( dataListener ) { const dataToForward = dataHandler . get ( model [ dataContainerName ] , dataListener . request , dataChanged ) ; if ( dataToForward && ( JSON . stringify ( dataToForward ) !== dataListener . request . lastPush || dataListener . request . metadata . forceFlush ) ) { dataListener . request . lastPush = JSON . stringify ( dataToForward ) ; dataListener . onDataReady ( dataToForward ) ; } } } catch ( err ) { console . log ( ` ${ dataName } ` , err ) ; } }
Internal function that will notify any subscriber with its data in a synchronous manner
Internal function that will notify any subscriber with its data in a synchronous manner