File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ function transformNode (el: ASTElement, options: CompilerOptions) {
1212 const warn = options . warn || baseWarn
1313 const staticStyle = getAndRemoveAttr ( el , 'style' )
1414 if ( staticStyle ) {
15+ /* istanbul ignore if */
1516 if ( process . env . NODE_ENV !== 'production' ) {
1617 const expression = parseText ( staticStyle , options . delimiters )
1718 if ( expression ) {
Original file line number Diff line number Diff line change 33import { cached , extend , toObject } from 'shared/util'
44
55export const parseStyleText = cached ( function ( cssText ) {
6- const rs = { }
7- if ( ! cssText ) {
8- return rs
9- }
6+ const res = { }
107 const hasBackground = cssText . indexOf ( 'background' ) >= 0
118 // maybe with background-image: url(http://xxx) or base64 img
129 const listDelimiter = hasBackground ? / ; (? ! [ ^ ( ] * \) ) / g : ';'
1310 const propertyDelimiter = hasBackground ? / : ( .+ ) / : ':'
1411 cssText . split ( listDelimiter ) . forEach ( function ( item ) {
1512 if ( item ) {
1613 var tmp = item . split ( propertyDelimiter )
17- tmp . length > 1 && ( rs [ tmp [ 0 ] . trim ( ) ] = tmp [ 1 ] . trim ( ) )
14+ tmp . length > 1 && ( res [ tmp [ 0 ] . trim ( ) ] = tmp [ 1 ] . trim ( ) )
1815 }
1916 } )
20- return rs
17+ return res
2118} )
2219
2320// merge static and dynamic style data on the same vnode
You can’t perform that action at this time.
0 commit comments