8000 #299 fix derective style · bencode/vue@23f4775 · GitHub
[go: up one dir, main page]

Skip to content

Commit 23f4775

Browse files
author
Dmitriy Filipenko
committed
vuejs#299 fix derective style
1 parent fe996b3 commit 23f4775

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/directives/style.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ module.exports = {
1919
update: function (value) {
2020
var prop = this.prop
2121
if (prop) {
22-
var isImportant = value.slice(-10) === '!important'
23-
? 'important'
24-
: ''
25-
if (isImportant) {
26-
value = value.slice(0, -10).trim()
22+
if (value){
23+
var isImportant = value.slice(-10) === '!important'
24+
? 'important'
25+
: ''
26+
if (isImportant) {
27+
value = value.slice(0, -10).trim()
28+
}
2729
}
2830
this.el.style.setProperty(prop, value, isImportant)
2931
if (this.prefixed) {

0 commit comments

Comments
 (0)
0