@@ -5,31 +5,6 @@ var gatherVariableDependencies = require('./gather-variable-dependencies');
5
5
var findNodeAncestorWithSelector = require ( './find-node-ancestor-with-selector' ) ;
6
6
var cloneSpliceParentOntoNodeWhen = require ( './clone-splice-parent-onto-node-when' ) ;
7
7
8
- /*
9
- Object.assign polyfill
10
- https://gist.github.com/WebReflection/10404826
11
- */
12
- if ( ! ( 'assign' in Object ) ) {
13
- Object . assign = function ( has ) {
14
- 'use strict' ;
15
- return assign ;
16
- function assign ( target , source ) {
17
- for ( var i = 1 ; i < arguments . length ; i ++ ) {
18
- copy ( target , arguments [ i ] ) ;
19
- }
20
- return target ;
21
- }
22
- function copy ( target , source ) {
23
- for ( var key in source ) {
24
- if ( has . call ( source , key ) ) {
25
- target [ key ] = source [ key ] ;
26
- }
27
- }
28
- }
29
- } ( { } . hasOwnProperty ) ;
30
- }
31
-
32
-
33
8
// var() = var( <custom-property-name> [, <any-value> ]? )
34
9
// matches `name[, fallback]`, captures "name" and "fallback"
35
10
// See: http://dev.w3.org/csswg/css-variables/#funcdef-var
@@ -84,11 +59,11 @@ var resolveValue = function(decl, map, /*optional*/ignorePseudoScope, /*internal
84
59
}
85
60
} ) ;
86
61
87
- var fallbackValue ;
88
- if ( fallback ) {
89
- var cloneDecl = Object . assign ( { } , decl , { value :fallback } ) ;
90
- fallbackValue = resolveValue ( cloneDecl , map , false , true ) . value ;
91
- }
62
+ var fallbackValue ;
63
+ if ( fallback ) {
64
+ var cloneDecl = Object . assign ( { } , decl , { value :fallback } ) ;
65
+ fallbackValue = resolveValue ( cloneDecl , map , false , true ) . value ;
66
+ }
92
67
93
68
// Default to the calculatedInPlaceValue which might be a previous fallback, then try this declarations fallback
94
69
var replaceValue = ( matchingVarDeclMapItem || { } ) . calculatedInPlaceValue || fallbackValue ;
0 commit comments