small fix in preview images

This commit is contained in:
Martina 2020-11-10 13:06:26 -08:00
parent 11e7e89a4b
commit 9e3ac1c032
2 changed files with 4 additions and 2 deletions

View File

@ -143,7 +143,8 @@ export default class SidebarSingleSlateSettings extends React.Component {
if ( if (
object.type && object.type &&
object.type.startsWith("image/") && object.type.startsWith("image/") &&
(!object.size || object.size < SIZE_LIMIT) object.size &&
object.size < SIZE_LIMIT
) { ) {
preview = object.url.replace("https://undefined", "https://"); preview = object.url.replace("https://undefined", "https://");
break; break;

View File

@ -255,7 +255,8 @@ export default class SlatePage extends React.Component {
if ( if (
objects[i].type && objects[i].type &&
objects[i].type.startsWith("image/") && 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://"); image = objects[i].url.replace("https://undefined", "https://");
break; break;