diff --git a/next-cloudinary/src/components/CldUploadWidget/CldUploadWidget.tsx b/next-cloudinary/src/components/CldUploadWidget/CldUploadWidget.tsx index 58b86ed7..3bb264b2 100644 --- a/next-cloudinary/src/components/CldUploadWidget/CldUploadWidget.tsx +++ b/next-cloudinary/src/components/CldUploadWidget/CldUploadWidget.tsx @@ -176,7 +176,7 @@ const CldUploadWidget = ({ widget.current = createWidget(); } - if (typeof widget?.current[method] === "function") { + if (typeof widget.current?.[method] === "function") { return widget.current[method](...options); } }