Compare commits

...

4 Commits

Author SHA1 Message Date
Andrew Henry
9afb9e4dab Merge branch 'master' into fix-2901 2020-04-30 09:38:27 -07:00
Andrew Henry
735a0457d9 Merge branch 'master' into fix-2901 2020-04-29 12:58:43 -07:00
Charles Hacskaylo
78de114257 Merge branch 'master' into fix-2901 2020-04-16 13:54:31 -07:00
charlesh88
b4cd159646 Fixes #2901
- Mod PreviewAction to prevent folders from being previewed;
2020-04-09 11:54:29 -07:00

View File

@@ -63,7 +63,7 @@ export default class PreviewAction {
}); });
} }
appliesTo(objectPath) { appliesTo(objectPath) {
return !this._isNavigatedObject(objectPath) return !this._isNavigatedObject(objectPath) && !this._preventPreview(objectPath);
} }
_isNavigatedObject(objectPath) { _isNavigatedObject(objectPath) {
let targetObject = objectPath[0]; let targetObject = objectPath[0];
@@ -71,4 +71,8 @@ export default class PreviewAction {
return targetObject.identifier.namespace === navigatedObject.identifier.namespace && return targetObject.identifier.namespace === navigatedObject.identifier.namespace &&
targetObject.identifier.key === navigatedObject.identifier.key; targetObject.identifier.key === navigatedObject.identifier.key;
} }
_preventPreview(objectPath) {
const noPreviewTypes = ['folder'];
return noPreviewTypes.includes(objectPath[0].type);
}
} }