refactor: download image directly without opening the new window

This commit is contained in:
infeng 2018-04-17 13:56:20 +08:00
parent 02542e6c33
commit 23b5fc965f

View File

@ -274,7 +274,7 @@ export default class ViewerCore extends React.Component<ViewerProps, ViewerCoreS
handleDownload = () => {
const activeImage = this.getActiveImage();
if (activeImage.downloadUrl) {
window.open(activeImage.downloadUrl);
location.href = activeImage.downloadUrl;
}
};