diff --git a/components/sidebars/SidebarSingleSlateSettings.js b/components/sidebars/SidebarSingleSlateSettings.js index d837ff58..c3ab81b4 100644 --- a/components/sidebars/SidebarSingleSlateSettings.js +++ b/components/sidebars/SidebarSingleSlateSettings.js @@ -143,7 +143,8 @@ export default class SidebarSingleSlateSettings extends React.Component { if ( object.type && object.type.startsWith("image/") && - (!object.size || object.size < SIZE_LIMIT) + object.size && + object.size < SIZE_LIMIT ) { preview = object.url.replace("https://undefined", "https://"); break; diff --git a/pages/_/slate.js b/pages/_/slate.js index fa88a5f8..ed8dfbda 100644 --- a/pages/_/slate.js +++ b/pages/_/slate.js @@ -255,7 +255,8 @@ export default class SlatePage extends React.Component { if ( objects[i].type && objects[i].type.startsWith("image/") && - (!objects[i].size || objects[i].size < SIZE_LIMIT) + objects[i].size && + objects[i].size < SIZE_LIMIT ) { image = objects[i].url.replace("https://undefined", "https://"); break;