Migrate Promise#return() in file.js

This commit is contained in:
Abe Jellinek 2025-07-02 10:29:43 -04:00 • committed by Dan Stillman
parent 9cad92b817
commit ce0ee4b693

View file

@ -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;