Skip to content

Commit b2c85e3

Browse files
committed
Remove built-in serialization of Object class / className values, which was limited compared to npm.im/classnames and prevented third party CSS mechanisms from working. Fixes #401.
1 parent 73947d6 commit b2c85e3

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

src/dom/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,8 @@ export function removeNode(node) {
2121
* @private
2222
*/
2323
export function setAccessor(node, name, old, value, isSvg) {
24-
2524
if (name==='className') name = 'class';
2625

27-
if (name==='class' && value && typeof value==='object') {
28-
value = hashToClassName(value);
29-
}
3026

3127
if (name==='key') {
3228
// ignore

src/util.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,6 @@ export function isString(obj) {
3131
}
3232

3333

34-
/** Convert a hashmap of CSS classes to a space-delimited className string
35-
* @private
36-
*/
37-
export function hashToClassName(c) {
38-
let str = '';
39-
for (let prop in c) {
40-
if (c[prop]) {
41-
if (str) str += ' ';
42-
str += prop;
43-
}
44-
}
45-
return str;
46-
}
4734

4835

4936
/** Just a memoized String#toLowerCase */

0 commit comments

Comments
 (0)