Browse Source

Added const

Artur Paikin 9 years ago
parent
commit
bd90171773
3 changed files with 11 additions and 10 deletions
  1. 3 3
      src/core/Utils.js
  2. 3 3
      website/_config.yml
  3. 5 4
      website/themes/uppy/source/uppy/uppy.js

+ 3 - 3
src/core/Utils.js

@@ -2,11 +2,11 @@
 * Runs a waterfall of promises: calls each task, passing the result
 * from the previous one as an argument. The first task is run with an empty array.
 *
-* @param {Array} methods an array of Promises to run waterfall on
-* @return {Promise} of the last task
+* @param {array} methods of Promises to run waterfall on
+* @return {Promise} of the final task
 */
 function promiseWaterfall(methods) {
-  [resolvedPromise, ...tasks] = methods;
+  const [resolvedPromise, ...tasks] = methods;
   const finalTaskPromise = tasks.reduce(function (prevTaskPromise, task) {
     return prevTaskPromise.then(task);
   }, resolvedPromise([]));  // initial value

+ 3 - 3
website/_config.yml

@@ -5,9 +5,9 @@
 # Uppy versions, auto updated by update.js
 uppy_version: 0.0.1
 
-uppy_dev_size: "87.55"
-uppy_min_size: "87.55"
-uppy_gz_size: "87.55"
+uppy_dev_size: "87.56"
+uppy_min_size: "87.56"
+uppy_gz_size: "87.56"
 
 # Theme
 google_analytics: UA-63083-12

+ 5 - 4
website/themes/uppy/source/uppy/uppy.js

@@ -2123,8 +2123,8 @@ module.exports = exports['default'];
 * Runs a waterfall of promises: calls each task, passing the result
 * from the previous one as an argument. The first task is run with an empty array.
 *
-* @param {Array} methods an array of Promises to run waterfall on
-* @return {Promise} of the last task
+* @param {array} methods of Promises to run waterfall on
+* @return {Promise} of the final task
 */
 'use strict';
 
@@ -2137,8 +2137,9 @@ function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); }
 function promiseWaterfall(methods) {
   var _methods = _toArray(methods);
 
-  resolvedPromise = _methods[0];
-  tasks = _methods.slice(1);
+  var resolvedPromise = _methods[0];
+
+  var tasks = _methods.slice(1);
 
   var finalTaskPromise = tasks.reduce(function (prevTaskPromise, task) {
     return prevTaskPromise.then(task);