return empty string instead of invalid data url

This commit is contained in:
j 2023-07-09 15:43:50 +05:30
parent 5225026d66
commit 9355ae691d

View file

@ -52,6 +52,9 @@ pandora.ui.editPanel = function(isEmbed) {
} }
function getSmallTimelineURL() { function getSmallTimelineURL() {
if (!edit.duration) {
return ''
}
smallTimelineCanvas = getSmallTimelineCanvas(); smallTimelineCanvas = getSmallTimelineCanvas();
smallTimelineContext = smallTimelineCanvas.getContext('2d'); smallTimelineContext = smallTimelineCanvas.getContext('2d');
return smallTimelineCanvas.toDataURL(); return smallTimelineCanvas.toDataURL();