Skip to content

Commit e5284ab

Browse files
committed
fix: add _this to sandbox variables, #1020
1 parent 6ce4010 commit e5284ab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/proxy/inject.js

+1
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ function inject(target, currentGeneration, injectedMembers) {
156156
target[REGENERATE_METHOD](
157157
key,
158158
`(function REACT_HOT_LOADER_SANDBOX () {
159+
var _this = this; // common babel transpile
159160
${usedThis.map(name => `var ${name} = this;`)}
160161
161162
return ${injectedMembers[key]};

0 commit comments

Comments
 (0)