|
|
@@ -42,7 +42,7 @@ export function create (node) {
|
|
|
function compatibleProcessing (widget) {
|
|
|
switch (widget.type) {
|
|
|
case WidgetType.IMAGE:
|
|
|
- widget.sources.forEach(source => {
|
|
|
+ widget.sources?.forEach(source => {
|
|
|
source.type = AssetType.IMAGE
|
|
|
if (!source.duration) {
|
|
|
Vue.set(source, 'duration', widget.interval)
|
|
|
@@ -50,16 +50,16 @@ function compatibleProcessing (widget) {
|
|
|
})
|
|
|
break
|
|
|
case WidgetType.VIDEO:
|
|
|
- widget.sources.forEach(source => {
|
|
|
+ widget.sources?.forEach(source => {
|
|
|
source.type = AssetType.VIDEO
|
|
|
})
|
|
|
break
|
|
|
default:
|
|
|
if (!widget.type) {
|
|
|
- widget.bgm.forEach(source => {
|
|
|
+ widget.bgm?.forEach(source => {
|
|
|
source.type = AssetType.AUDIO
|
|
|
})
|
|
|
- widget.backgroundImage.forEach(source => {
|
|
|
+ widget.backgroundImage?.forEach(source => {
|
|
|
source.type = AssetType.IMAGE
|
|
|
})
|
|
|
}
|