1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/components/realtime-validation-settings.js.es6
2021-01-30 23:16:04 +05:30

17 Zeilen
453 B
JavaScript

import Component from "@ember/component";
export default Component.extend({
init(){
this._super(...arguments);
if (!this.validations) return;
if (!this.field.validations) {
const validations = {};
this.validations.forEach((validation) => {
validations[validation] = {};
});
this.set('field.validations', EmberObject.create(validations));
}
}
});