hiding preview option on folder selection
@@ -316,11 +316,11 @@ function updateSelectionMenuContext() {
uiActionStates.paste.disabled = true;
uiActionStates.subMenuSetContentType.disabled = true;
uiActionStates.subMenuSetContentType.fileMenu.hidden = true;
+ }
let previewDataURL = selected.children('span.fb-preview-data-url').text();
- if (previewDataURL == 'null') {
+ if (previewDataURL === 'null' || previewDataURL === 'undefined') {
uiActionStates.preview.fileMenu.hidden = true;
- };
}
let logicalFileTypeToSet = selected.children('span.fb-logical-file-type').attr("data-logical-file-type-to-set");
