Skip to content

Commit 9658dcf

Browse files
committed
add todo
1 parent d9abd68 commit 9658dcf

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

compat/src/render.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function handleDomVNode(vnode) {
200200
}
201201

202202
if (props.class && !props.className) {
203-
normalizedProps.class = normalizedProps.className = props.class;
203+
normalizedProps.class = props.class;
204204
Object.defineProperty(
205205
normalizedProps,
206206
'className',

compat/test/browser/render.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ describe('compat render', () => {
320320
it('should preserve className, add class alias', () => {
321321
const { props } = <ul className="from className" />;
322322
expect(props).to.have.property('className', 'from className');
323+
// TODO: why would we do this, assuming that folks add className themselves
323324
expect(props).to.have.property('class', 'from className');
324325
});
325326

@@ -342,6 +343,7 @@ describe('compat render', () => {
342343
const { props } = <ul className="from className" />;
343344
const spreaded = (<li a {...props} />).props;
344345
expect(spreaded).to.have.property('className', 'from className');
346+
// TODO: why would we do this, assuming that folks add className themselves
345347
expect(spreaded).to.have.property('class', 'from className');
346348
expect(spreaded.propertyIsEnumerable('class')).to.equal(true);
347349
});

0 commit comments

Comments
 (0)