From ffcb04e75376a67713e99fbbbdd4a9167540a153 Mon Sep 17 00:00:00 2001 From: Sarab Singh Date: Sun, 3 May 2020 03:20:40 +0530 Subject: [PATCH] no more breaking of screensaver --- src/components/slideshow/slideshow.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/slideshow/slideshow.js b/src/components/slideshow/slideshow.js index 0550ccdda..715e16325 100644 --- a/src/components/slideshow/slideshow.js +++ b/src/components/slideshow/slideshow.js @@ -73,7 +73,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f if (item.BackdropImageTags && item.BackdropImageTags.length) { return getBackdropImageUrl(item, imageOptions, apiClient); } else { - if (item.MediaType === 'Photo' && user.Policy.EnableContentDownloading) { + if (item.MediaType === 'Photo' && user && user.Policy.EnableContentDownloading) { return apiClient.getItemDownloadUrl(item.Id); } imageOptions.type = "Primary"; @@ -155,7 +155,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f html += '
'; if (actionButtonsOnTop) { - if (appHost.supports('filedownload') && options.user.Policy.EnableContentDownloading) { + if (appHost.supports('filedownload') && options.user && options.user.Policy.EnableContentDownloading) { html += getIcon('file_download', 'btnDownload slideshowButton', true); } if (appHost.supports('sharing')) { @@ -169,7 +169,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f html += '
'; html += getIcon('play_arrow', 'btnSlideshowPause slideshowButton', true, true); - if (appHost.supports('filedownload') && options.user.Policy.EnableContentDownloading) { + if (appHost.supports('filedownload') && options.user && options.user.Policy.EnableContentDownloading) { html += getIcon('file_download', 'btnDownload slideshowButton', true); } if (appHost.supports('sharing')) {