Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-10 12:22:54 +01:00
17 Zeilen
453 B
JavaScript
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));
|
|
}
|
|
}
|
|
});
|