hummingbird-me/hummingbird

View on GitHub
frontend/app/instance-initializers/preload.js

Summary

Maintainability
A
0 mins
Test Coverage
export function initialize(instance) {
  if (window.preloadData) {
    let store = instance.container.lookup('store:main');
    window.preloadData.forEach((item) => {
      store.pushPayload(item);
    });
  }
}

export default {
  name: 'preload',
  initialize: initialize
};