ember-moment icon indicating copy to clipboard operation
ember-moment copied to clipboard

Environment configuration does not work as documented

Open mayatron opened this issue 3 years ago • 2 comments

The README.md shows the following example configuration for the allowEmpty option:

// config/environment.js
module.exports = function() {
  return {
    moment: {
      allowEmpty: true // default: false
    }
  }
};

However, this does not seem to work for me, unless I change the key from moment to 'ember-moment' like this:

// config/environment.js
module.exports = function() {
  return {
    'ember-moment': {
      allowEmpty: true // default: false
    }
  }
};

Additionally, the application config appears to point to ember-moment as the expected key in multiple places:

  • https://github.com/adopted-ember-addons/ember-moment/blob/c80dd174c034d1ad62d2e016ea46d7de05d4cf98/src/services/moment.js#L23
  • https://github.com/adopted-ember-addons/ember-moment/blob/c80dd174c034d1ad62d2e016ea46d7de05d4cf98/test-app/config/environment.js#L9

Am I missing something? Or should we update the README from moment to 'ember-moment'?

mayatron avatar Feb 07 '22 21:02 mayatron

I'm experiencing this as well (ember-moment v10.0.0). Config in config/environment.js is not picked up by key moment, but ember-moment. May I suggest broadening the title of this issue @mayatron ?

MikiDi avatar Mar 31 '22 08:03 MikiDi

I'm experiencing this as well (ember-moment v10.0.0). Config in config/environment.js is not picked up by key moment, but ember-moment. May I suggest broadening the title of this issue @mayatron ?

Done!

mayatron avatar Mar 31 '22 20:03 mayatron