File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ const SHALLOW = { shallow: true };
1414
1515// components without names, kept as a hash for later comparison to return consistent UnnamedComponentXX names.
1616const UNNAMED = [ ] ;
17+ const _skipEffects = '__s' ;
1718
1819const VOID_ELEMENTS = / ^ ( a r e a | b a s e | b r | c o l | e m b e d | h r | i m g | i n p u t | l i n k | m e t a | p a r a m | s o u r c e | t r a c k | w b r ) $ / ;
1920
@@ -47,10 +48,15 @@ const EMPTY_ARR = [];
4748function renderToString ( vnode , context , opts ) {
4849 context = context || { } ;
4950 opts = opts || { } ;
51+
52+ const previousSkipEffects = options [ _skipEffects ] ;
53+ options [ _skipEffects ] = true ;
54+
5055 const res = _renderToString ( vnode , context , opts ) ;
5156 // options._commit, we don't schedule any effects in this library right now,
5257 // so we can pass an empty queue to this hook.
5358 if ( options . __c ) options . __c ( vnode , EMPTY_ARR ) ;
59+ options [ _skipEffects ] = previousSkipEffects ;
5460 return res ;
5561}
5662
You can’t perform that action at this time.
0 commit comments