diff --git a/frontend/src/Editor/Components/PDF.jsx b/frontend/src/Editor/Components/PDF.jsx
index 442c4e7b75..de749705f4 100644
--- a/frontend/src/Editor/Components/PDF.jsx
+++ b/frontend/src/Editor/Components/PDF.jsx
@@ -46,46 +46,45 @@ export const PDF = React.memo(({ styles, properties, width, height }) => {
[pageNumber]
);
+ const renderPDF = () => (
+
+ {Array.from(new Array(numPages), (el, index) => (
+ (pageRef.current[index] = el)}
+ />
+ ))}
+ {pageControls && (
+ <>
+
+
+
+ {pageNumber} of {numPages}
+
+
+
+ >
+ )}
+
+ );
+
return (
-
- {Array.from(new Array(numPages), (el, index) => (
- (pageRef.current[index] = el)}
- />
- ))}
- {pageControls && (
- <>
-
-
-
- {pageNumber} of {numPages}
-
-
-
- >
- )}
-
+ {url === '' ? 'No PDF file specified' : renderPDF()}