-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
10202c6
commit 60a5c3b
Showing
4 changed files
with
59 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* Less - Leaner CSS v2.7.2 | ||
* Less - Leaner CSS v2.7.3 | ||
* http://lesscss.org | ||
* | ||
* Copyright (c) 2009-2017, Alexis Sellier <[email protected]> | ||
|
@@ -2477,7 +2477,7 @@ module.exports = function(environment, fileManagers) { | |
var SourceMapOutput, SourceMapBuilder, ParseTree, ImportManager, Environment; | ||
|
||
var less = { | ||
version: [2, 7, 2], | ||
version: [2, 7, 3], | ||
data: require('./data'), | ||
tree: require('./tree'), | ||
Environment: (Environment = require("./environment/environment")), | ||
|
@@ -10335,9 +10335,12 @@ function flush() { | |
|
||
// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that | ||
// have WebKitMutationObserver but not un-prefixed MutationObserver. | ||
// Must use `global` instead of `window` to work in both frames and web | ||
// Must use `global` or `self` instead of `window` to work in both frames and web | ||
// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop. | ||
var BrowserMutationObserver = global.MutationObserver || global.WebKitMutationObserver; | ||
|
||
/* globals self */ | ||
var scope = typeof global !== "undefined" ? global : self; | ||
var BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver; | ||
|
||
// MutationObservers are desirable because they have high priority and work | ||
// reliably everywhere they are implemented. | ||
|
@@ -10538,17 +10541,17 @@ function Promise(fn) { | |
throw new TypeError('Promises must be constructed via new'); | ||
} | ||
if (typeof fn !== 'function') { | ||
throw new TypeError('not a function'); | ||
throw new TypeError('Promise constructor\'s argument is not a function'); | ||
} | ||
this._45 = 0; | ||
this._81 = 0; | ||
this._65 = null; | ||
this._54 = null; | ||
this._40 = 0; | ||
this._65 = 0; | ||
this._55 = null; | ||
this._72 = null; | ||
if (fn === noop) return; | ||
doResolve(fn, this); | ||
} | ||
Promise._10 = null; | ||
Promise._97 = null; | ||
Promise._37 = null; | ||
Promise._87 = null; | ||
Promise._61 = noop; | ||
|
||
Promise.prototype.then = function(onFulfilled, onRejected) { | ||
|
@@ -10566,43 +10569,43 @@ function safeThen(self, onFulfilled, onRejected) { | |
res.then(resolve, reject); | ||
handle(self, new Handler(onFulfilled, onRejected, res)); | ||
}); | ||
}; | ||
} | ||
function handle(self, deferred) { | ||
while (self._81 === 3) { | ||
self = self._65; | ||
while (self._65 === 3) { | ||
self = self._55; | ||
} | ||
if (Promise._10) { | ||
Promise._10(self); | ||
if (Promise._37) { | ||
Promise._37(self); | ||
} | ||
if (self._81 === 0) { | ||
if (self._45 === 0) { | ||
self._45 = 1; | ||
self._54 = deferred; | ||
if (self._65 === 0) { | ||
if (self._40 === 0) { | ||
self._40 = 1; | ||
self._72 = deferred; | ||
return; | ||
} | ||
if (self._45 === 1) { | ||
self._45 = 2; | ||
self._54 = [self._54, deferred]; | ||
if (self._40 === 1) { | ||
self._40 = 2; | ||
self._72 = [self._72, deferred]; | ||
return; | ||
} | ||
self._54.push(deferred); | ||
self._72.push(deferred); | ||
return; | ||
} | ||
handleResolved(self, deferred); | ||
} | ||
|
||
function handleResolved(self, deferred) { | ||
asap(function() { | ||
var cb = self._81 === 1 ? deferred.onFulfilled : deferred.onRejected; | ||
var cb = self._65 === 1 ? deferred.onFulfilled : deferred.onRejected; | ||
if (cb === null) { | ||
if (self._81 === 1) { | ||
resolve(deferred.promise, self._65); | ||
if (self._65 === 1) { | ||
resolve(deferred.promise, self._55); | ||
} else { | ||
reject(deferred.promise, self._65); | ||
reject(deferred.promise, self._55); | ||
} | ||
return; | ||
} | ||
var ret = tryCallOne(cb, self._65); | ||
var ret = tryCallOne(cb, self._55); | ||
if (ret === IS_ERROR) { | ||
reject(deferred.promise, LAST_ERROR); | ||
} else { | ||
|
@@ -10630,38 +10633,38 @@ function resolve(self, newValue) { | |
then === self.then && | ||
newValue instanceof Promise | ||
) { | ||
self._81 = 3; | ||
self._65 = newValue; | ||
self._65 = 3; | ||
self._55 = newValue; | ||
finale(self); | ||
return; | ||
} else if (typeof then === 'function') { | ||
doResolve(then.bind(newValue), self); | ||
return; | ||
} | ||
} | ||
self._81 = 1; | ||
self._65 = newValue; | ||
self._65 = 1; | ||
self._55 = newValue; | ||
finale(self); | ||
} | ||
|
||
function reject(self, newValue) { | ||
self._81 = 2; | ||
self._65 = newValue; | ||
if (Promise._97) { | ||
Promise._97(self, newValue); | ||
self._65 = 2; | ||
self._55 = newValue; | ||
if (Promise._87) { | ||
Promise._87(self, newValue); | ||
} | ||
finale(self); | ||
} | ||
function finale(self) { | ||
if (self._45 === 1) { | ||
handle(self, self._54); | ||
self._54 = null; | ||
if (self._40 === 1) { | ||
handle(self, self._72); | ||
self._72 = null; | ||
} | ||
if (self._45 === 2) { | ||
for (var i = 0; i < self._54.length; i++) { | ||
handle(self, self._54[i]); | ||
if (self._40 === 2) { | ||
for (var i = 0; i < self._72.length; i++) { | ||
handle(self, self._72[i]); | ||
} | ||
self._54 = null; | ||
self._72 = null; | ||
} | ||
} | ||
|
||
|
@@ -10687,7 +10690,7 @@ function doResolve(fn, promise) { | |
if (done) return; | ||
done = true; | ||
reject(promise, reason); | ||
}) | ||
}); | ||
if (!done && res === IS_ERROR) { | ||
done = true; | ||
reject(promise, LAST_ERROR); | ||
|
@@ -10714,8 +10717,8 @@ var EMPTYSTRING = valuePromise(''); | |
|
||
function valuePromise(value) { | ||
var p = new Promise(Promise._61); | ||
p._81 = 1; | ||
p._65 = value; | ||
p._65 = 1; | ||
p._55 = value; | ||
return p; | ||
} | ||
Promise.resolve = function (value) { | ||
|
@@ -10752,11 +10755,11 @@ Promise.all = function (arr) { | |
function res(i, val) { | ||
if (val && (typeof val === 'object' || typeof val === 'function')) { | ||
if (val instanceof Promise && val.then === Promise.prototype.then) { | ||
while (val._81 === 3) { | ||
val = val._65; | ||
while (val._65 === 3) { | ||
val = val._55; | ||
} | ||
if (val._81 === 1) return res(i, val._65); | ||
if (val._81 === 2) reject(val._65); | ||
if (val._65 === 1) return res(i, val._55); | ||
if (val._65 === 2) reject(val._55); | ||
val.then(function (val) { | ||
res(i, val); | ||
}, reject); | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters