simplify picture.copyAsync

This commit is contained in:
Tyler Pham 2018-09-16 19:19:13 -04:00
parent a201722f6d
commit dca4b9c82b

View File

@ -807,9 +807,9 @@ function savePhoto(picture, options, successCallback, errorCallback) {
pictureName = pictureName.replace(/\.png$/, ".jpg");
}
picture
.copyAsync(getAppData().localFolder, pictureName, OptUnique)
.done(function (copiedFile) { successCallback("ms-appdata:///local/" + copiedFile.name); }, errorCallback);
picture.copyAsync(getAppData().localFolder, pictureName, OptUnique).done(function (copiedFile) {
successCallback('ms-appdata:///local/' + copiedFile.name);
}, errorCallback);
}
} else {
if (options.targetHeight > 0 && options.targetWidth > 0) {