Skip to content

Commit

Permalink
Merge pull request #52 from elraccoone/improvements/typescript-upgrade
Browse files Browse the repository at this point in the history
Fixed element implicity on Window object
  • Loading branch information
Jeffrey Lanters authored Nov 1, 2018
2 parents 7a96553 + 1f9a2be commit a1d2f63
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/UnityContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ export default class UnityContent {
eventName: eventName,
eventCallback: eventCallback
});
if (typeof window["ReactUnityWebGL"] === "undefined")
window["ReactUnityWebGL"] = {};
window["ReactUnityWebGL"][eventName] = (parameter: any) => {
if (typeof (window as any).ReactUnityWebGL === "undefined")
(window as any).ReactUnityWebGL = {};
(window as any).ReactUnityWebGL[eventName] = (parameter: any) => {
return eventCallback(parameter);
};
}
Expand Down

0 comments on commit a1d2f63

Please sign in to comment.