Update app/assets/javascripts/admin/addon/components/admin-embedding-host-form.gjs

Co-authored-by: Martin Brennan <martin@discourse.org>
This commit is contained in:
Krzysztof Kotlarek 2024-12-19 15:40:33 +11:00
parent f463cb358e
commit 6b5c09eb28

View File

@ -30,17 +30,15 @@ export default class AdminEmbeddingHostForm extends Component {
}
get formData() {
if (this.isUpdate) {
return {
if (!this.editing) { return {} }
return {
host: this.args.host.host,
allowed_paths: this.args.host.allowed_paths,
category: this.args.host.category_id,
tags: this.args.host.tags,
user: isEmpty(this.args.host.user) ? null : [this.args.host.user],
};
} else {
return {};
}
}
@action