File tree 1 file changed +5
-9
lines changed
1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -61,28 +61,25 @@ exports.addon = function (renderer) {
61
61
require ( './__dev__/warnOnMissingDependencies' ) ( 'cssom' , renderer , [ 'createRule' ] ) ; // cssom
62
62
}
63
63
64
+ // VCSSOM support only browser environment.
65
+ if ( ! renderer . client ) return ;
66
+
64
67
var kebab = renderer . kebab ;
65
68
66
69
function VRule ( rule , decl ) {
67
70
this . rule = rule ;
68
71
this . decl = decl ;
69
72
}
70
-
71
73
VRule . prototype . diff = function ( newDecl ) {
72
74
var oldDecl = this . decl ;
73
75
var style = this . rule . style ;
74
76
var property ;
75
-
76
77
for ( property in oldDecl )
77
78
if ( newDecl [ property ] === undefined )
78
79
style . removeProperty ( property ) ;
79
-
80
- for ( property in newDecl ) {
81
- if ( newDecl [ property ] !== oldDecl [ property ] ) {
80
+ for ( property in newDecl )
81
+ if ( newDecl [ property ] !== oldDecl [ property ] )
82
82
style . setProperty ( kebab ( property ) , newDecl [ property ] ) ;
83
- }
84
- }
85
-
86
83
this . decl = newDecl ;
87
84
} ;
88
85
@@ -98,7 +95,6 @@ exports.addon = function (renderer) {
98
95
*/
99
96
this . tree = { } ;
100
97
}
101
-
102
98
VSheet . prototype . diff = function ( newTree ) {
103
99
var sh = renderer . sh . sheet ;
104
100
var msh = renderer . msh . sheet ;
You can’t perform that action at this time.
0 commit comments