Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wobba committed May 28, 2023
1 parent 500a367 commit e5bdf3f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ export default class SearchResultsContainer extends React.Component<ISearchResul
let webUrl = ObjectHelper.byPath(item, "SPWebUrl");
let uniqueId = ObjectHelper.byPath(item, "NormUniqueID");
const itemFileType = ObjectHelper.byPath(item, slots[BuiltinTemplateSlots.FileType]);
if( webUrl && uniqueId && itemFileType.toUpperCase() !== "ASPX") {
if( webUrl && uniqueId && itemFileType && itemFileType.toUpperCase() !== "ASPX") {
item.AutoPreviewUrl = `${webUrl}/_layouts/15/viewer.aspx?sourcedoc={${uniqueId}}`;
} else if (pathProperty && pathProperty.indexOf("?") === -1 && !isContainer) {
item.AutoPreviewUrl = pathProperty + "?web=1";
Expand Down

0 comments on commit e5bdf3f

Please sign in to comment.