mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 18:12:59 +08:00
Prevent ItemList crash when item is a number
This commit is contained in:
parent
601f7adb0f
commit
39c3b468dc
|
@ -50,9 +50,7 @@ export default class ItemList {
|
|||
|
||||
for (const i in this) {
|
||||
if (this.hasOwnProperty(i) && this[i] instanceof Item) {
|
||||
if (typeof this[i].content === 'string') {
|
||||
this[i].content = new String(this[i].content);
|
||||
}
|
||||
this[i].content = Object(this[i].content);
|
||||
|
||||
this[i].content.itemName = i;
|
||||
items.push(this[i]);
|
||||
|
|
Loading…
Reference in New Issue
Block a user