Skip to content

Commit 9878bec

Browse files
committed
tmp dirty fix
1 parent feebfaa commit 9878bec

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/CSSStyleDeclaration-impl.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,17 +285,18 @@ function createSetter(property, setter, longhands) {
285285
const shorthands = [];
286286

287287
implementedProperties.forEach(property => {
288-
const camelCaseName = cssPropertyToIDLAttribute(property);
288+
const attribute = cssPropertyToIDLAttribute(property);
289+
const filename = attribute[0].toLowerCase() + attribute.slice(1);
289290
const {
290291
definition,
291292
longhands,
292293
serialize = serializeShorthand,
293-
} = require(`./properties/${camelCaseName}`);
294+
} = require(`./properties/${filename}`);
294295
if (longhands) {
295296
shorthands.push([property, longhands, serialize]);
296297
}
297298
definition.set = createSetter(property, definition.set, longhands);
298-
Object.defineProperty(CSSStyleDeclarationImpl.prototype, camelCaseName, definition);
299+
Object.defineProperty(CSSStyleDeclarationImpl.prototype, attribute, definition);
299300
Object.defineProperty(CSSStyleDeclarationImpl.prototype, property, definition);
300301
});
301302

0 commit comments

Comments
 (0)