Skip to content

Commit

Permalink
Fix usage in parcel
Browse files Browse the repository at this point in the history
  • Loading branch information
esamattis committed Apr 30, 2021
1 parent b3e163c commit fb44b3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/immer-reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ export function _clearKnownClasses() {
interface WebpackModule {
hot?: {
status(): string;
addStatusHandler: (handler: (status: string) => void) => void;
addStatusHandler?: (handler: (status: string) => void) => void;
};
}

Expand All @@ -396,7 +396,7 @@ declare const module: WebpackModule | undefined;
if (typeof module !== "undefined") {
// Clear classes on Webpack Hot Module replacement as it will mess up the
// duplicate checks appear
module.hot?.addStatusHandler((status) => {
module.hot?.addStatusHandler?.(status => {
if (status === "prepare") {
_clearKnownClasses();
}
Expand Down

0 comments on commit fb44b3a

Please sign in to comment.