Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit e2d596d

Browse files
committed
displayName setter fix
1 parent c6b0763 commit e2d596d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/react/api.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,14 @@ class extends React.Component {
5656
this.__opalInstance = #{type.new(`this`)};
5757
this.__opalInstanceInitializedState = true;
5858
this.__opalInstanceSyncSetState = false;
59-
this.__name = #{type.name}
59+
this.__name = #{type.name};
6060
}
6161
static get displayName() {
62-
return this.__name;
62+
if (typeof this.__name != "undefined") {
63+
return this.__name;
64+
} else {
65+
return #{type.name};
66+
}
6367
}
6468
static set displayName(name) {
6569
this.__name = name;

0 commit comments

Comments
 (0)