mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
fix crash when loadedWidgets
is not a array
This commit is contained in:
parent
3e49de7a0f
commit
b2127fc0d6
@ -16,24 +16,26 @@ export default class WidgetsView extends React.Component {
|
|||||||
return <div className="widgets_load">
|
return <div className="widgets_load">
|
||||||
<div className="widgets_load_list">
|
<div className="widgets_load_list">
|
||||||
{
|
{
|
||||||
this.state.loadedWidgets.map((manifest) => {
|
Array.isArray(this.state.loadedWidgets) && this.state.loadedWidgets.map((manifest) => {
|
||||||
return <WidgetItemPreview
|
return <React.Fragment>
|
||||||
manifest={manifest}
|
<WidgetItemPreview
|
||||||
onRemove={() => {
|
manifest={manifest}
|
||||||
app.cores.widgets.uninstall(manifest._id)
|
onRemove={() => {
|
||||||
}}
|
app.cores.widgets.uninstall(manifest._id)
|
||||||
onInstall={() => {
|
}}
|
||||||
app.cores.widgets.install(manifest._id)
|
onInstall={() => {
|
||||||
}}
|
app.cores.widgets.install(manifest._id)
|
||||||
onUpdate={() => {
|
}}
|
||||||
app.cores.widgets.install(manifest._id, {
|
onUpdate={() => {
|
||||||
update: true,
|
app.cores.widgets.install(manifest._id, {
|
||||||
})
|
update: true,
|
||||||
}}
|
})
|
||||||
onChangeVisible={(visible) => {
|
}}
|
||||||
app.cores.widgets.toogleVisibility(manifest._id, visible)
|
onChangeVisible={(visible) => {
|
||||||
}}
|
app.cores.widgets.toogleVisibility(manifest._id, visible)
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
</React.Fragment>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user