Skip to content

Commit

Permalink
fix: fix an issue when the media preview is not a string (#81)
Browse files Browse the repository at this point in the history
Co-authored-by: Randy Merrill <randy@blinkk.com>
  • Loading branch information
jeremydw and Zoramite committed Jul 9, 2021
1 parent d4143ca commit 5f40ad6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ts/editor/field/media.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
DataType,
DeepObject,
DroppableMixin,
DroppableUiComponent,
Expand Down Expand Up @@ -306,7 +307,7 @@ export class MediaField
return value.url;
}

if (value && value.path) {
if (value && value.path && DataType.isString(value.path)) {
if (
value.path.startsWith('http:') ||
value.path.startsWith('https:') ||
Expand Down

0 comments on commit 5f40ad6

Please sign in to comment.