mirror of
https://github.com/zotero/zotero.git
synced 2026-10-05 02:43:38 +00:00
Migrate Promise#return() in file.js
This commit is contained in:
parent
9cad92b817
commit
ce0ee4b693
1 changed files with 1 additions and 1 deletions
|
|
@ -662,7 +662,7 @@ Zotero.File = new function () {
|
|||
*/
|
||||
this.removeIfExists = function (path) {
|
||||
return Promise.resolve(OS.File.remove(path))
|
||||
.return(true)
|
||||
.then(() => true)
|
||||
.catch(function (e) {
|
||||
if (e instanceof OS.File.Error && e.becauseNoSuchFile) {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue