Skip to content

Commit

Permalink
Update unmount.js
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Jun 27, 2022
1 parent 2767608 commit 073a0aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/diff/unmount.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { MODE_UNMOUNTING, TYPE_DOM, TYPE_ROOT } from '../constants';
import { unsubscribeFromContext } from '../create-context';
import options from '../options';
import { applyRef } from './refs';
import { ENABLE_CLASSES } from '../component';

/**
* Unmount a virtual node from the tree and apply DOM changes
Expand All @@ -24,7 +25,7 @@ export function unmount(internal, parentInternal, skipRemove) {
if ((r = internal._component)) {
unsubscribeFromContext(internal);

if (r.componentWillUnmount) {
if (ENABLE_CLASSES && r.componentWillUnmount) {
try {
r.componentWillUnmount();
} catch (e) {
Expand Down

0 comments on commit 073a0aa

Please sign in to comment.