switch to Promise.all

This commit is contained in:
Luke Pulverenti 2015-11-28 03:22:48 -05:00
parent 9932bc3eb5
commit f65465a5ae
25 changed files with 60 additions and 80 deletions

View file

@ -53,10 +53,10 @@
parentPathPromise = parentPathPromise.promise();
}
$.when(promise, parentPathPromise).then(function (response1, response2) {
Promise.all(promise, parentPathPromise).then(function (responses) {
var folders = response1[0];
var parentPath = response2 && response2.length ? response2[0] || '' : '';
var folders = responses[0];
var parentPath = responses[1] || '';
$('#txtDirectoryPickerPath', page).val(path || "");