mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 08:22:41 +08:00
Prevent error when saving tag without isHidden attribute
closes flarum/core#289
This commit is contained in:
parent
b286ff82e0
commit
6db544abb1
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user