Skip to content

Commit 643d712

Browse files
committed
Changed className selector to getAttribute('class') to fix support for svg elements
1 parent 139851b commit 643d712

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rule.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ class Rule
241241
child = element.firstElementChild
242242
while (child)
243243
# If no class name you can skip setting up the dictionary
244-
if child.className isnt ''
245-
for elementKey in child.className.split(' ')
244+
if child.getAttribute('class') isnt ''
245+
for elementKey in child.getAttribute('class').split(' ')
246246
elementKey = '.' + elementKey
247247
# Check existing dictionary array
248248
elementArray = hash[elementKey] ? hash[elementKey] = []

0 commit comments

Comments
 (0)