module.exports = {
  imgNotFound: function (event) {
    const img = event;
    if (this.clientRunningEnvironment === 'BROWSER') {
      img.src = '../static-eam-app/image/imageNotFound.png';
    } else {
      img.src = './static-eam-app/image/imageNotFound.png';
    }
    img.onerror = null;
  },
  clientRunningEnvironment: function () {
    const href = window.location.href;
    if (href.indexOf('http') === 0) {
      return 'BROWSER';
    } else {
      return 'LOCAL';
    }
  },
};
