Skip to content

Commit 4b02767

Browse files
committed
fix: do not shadow component name
1 parent 35984ff commit 4b02767

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/proxy/utils.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,17 @@ export const doesSupportClasses = (function() {
3131
}
3232
})()
3333

34-
const ES6ProxyComponentFactory =
35-
doesSupportClasses &&
34+
const ES6ProxyComponentFactory = (InitialParent, postConstructionAction) =>
3635
indirectEval(`
3736
(function(InitialParent, postConstructionAction) {
38-
return class ProxyComponent extends InitialParent {
37+
return class ${InitialParent.name || 'HotComponent'} extends InitialParent {
3938
constructor(props, context) {
4039
super(props, context)
4140
postConstructionAction.call(this)
4241
}
4342
}
4443
})
45-
`)
44+
`)(InitialParent, postConstructionAction)
4645

4746
const ES5ProxyComponentFactory = function(
4847
InitialParent,

0 commit comments

Comments
 (0)