mirror of
https://github.com/flarum/core.git
synced 2025-08-08 09:26:34 +02:00
Prevent error when saving tag without isHidden attribute
closes flarum/core#289
This commit is contained in:
@@ -19,7 +19,7 @@ export default class EditTagModal extends Modal {
|
||||
this.slug = m.prop(this.tag.slug() || '');
|
||||
this.description = m.prop(this.tag.description() || '');
|
||||
this.color = m.prop(this.tag.color() || '');
|
||||
this.isHidden = m.prop(this.tag.isHidden() || '');
|
||||
this.isHidden = m.prop(this.tag.isHidden() || false);
|
||||
}
|
||||
|
||||
className() {
|
||||
|
@@ -56,7 +56,7 @@ class Tag extends Model
|
||||
$tag->slug = $slug;
|
||||
$tag->description = $description;
|
||||
$tag->color = $color;
|
||||
$tag->is_hidden = $isHidden;
|
||||
$tag->is_hidden = (bool) $isHidden;
|
||||
|
||||
return $tag;
|
||||
}
|
||||
|
Reference in New Issue
Block a user