fix addStyleBinding helper

This commit is contained in:
Evan You 2016-04-20 22:32:57 -04:00
parent da42ca8203
commit 3f2fb1fb03

View File

@ -15,7 +15,7 @@ export function addDirective (el, name, value, arg, modifiers) {
export function addStyleBinding (el, name, value) {
const code = `"${name}":${value}`
el.styleBinding = el.styleBinding
? el.styleBinding.replace(/}\s?$/, `${code},}`)
? el.styleBinding.replace(/}\s?$/, `,${code}}`)
: `{${code}}`
}