@@ -21,7 +21,7 @@ const isArray = Array.isArray;
2121const assign = Object . assign ;
2222
2323// Global state for the current render pass
24- let beforeDiff , afterDiff , renderHook ;
24+ let beforeDiff , afterDiff , renderHook , ummountHook ;
2525
2626/**
2727 * Render Preact JSX + Components to an HTML string.
@@ -42,6 +42,7 @@ export default function renderToString(vnode, context) {
4242 beforeDiff = options [ DIFF ] ;
4343 afterDiff = options [ DIFFED ] ;
4444 renderHook = options [ RENDER ] ;
45+ ummountHook = options . unmount ;
4546
4647 const parent = h ( Fragment , null ) ;
4748 parent [ CHILDREN ] = [ vnode ] ;
@@ -236,7 +237,7 @@ function _renderToString(vnode, context, isSvgMode, selectValue, parent) {
236237 if ( afterDiff ) afterDiff ( vnode ) ;
237238 vnode [ PARENT ] = undefined ;
238239
239- if ( options . unmount ) options . unmount ( vnode ) ;
240+ if ( ummountHook ) ummountHook ( vnode ) ;
240241
241242 return str ;
242243 }
@@ -354,7 +355,7 @@ function _renderToString(vnode, context, isSvgMode, selectValue, parent) {
354355
355356 if ( afterDiff ) afterDiff ( vnode ) ;
356357 vnode [ PARENT ] = undefined ;
357- if ( options . unmount ) options . unmount ( vnode ) ;
358+ if ( ummountHook ) ummountHook ( vnode ) ;
358359
359360 // Emit self-closing tag for empty void elements:
360361 if ( ! html && SELF_CLOSING . has ( type ) ) {
0 commit comments