mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Replace deprecated String.substr with String.slice
This commit is contained in:
parent
2719f08e26
commit
b98762dd68
17 changed files with 54 additions and 54 deletions
|
|
@ -175,7 +175,7 @@ export class AttachmentModel extends AbstractModel {
|
|||
const localEvent = event.originalEvent || event;
|
||||
if (attachment && localEvent && localEvent.dataTransfer && localEvent.dataTransfer.setData) {
|
||||
let link = this.linkDownload();
|
||||
if ('http' !== link.substr(0, 4)) {
|
||||
if ('http' !== link.slice(0, 4)) {
|
||||
link = location.protocol + '//' + location.host + location.pathname + link;
|
||||
}
|
||||
localEvent.dataTransfer.setData('DownloadURL', this.mimeType + ':' + this.fileName + ':' + link);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue