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 };
14
14
15
15
// components without names, kept as a hash for later comparison to return consistent UnnamedComponentXX names.
16
16
const UNNAMED = [ ] ;
17
+ const _skipEffects = '__s' ;
17
18
18
19
const 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 ) $ / ;
19
20
@@ -47,10 +48,15 @@ const EMPTY_ARR = [];
47
48
function renderToString ( vnode , context , opts ) {
48
49
context = context || { } ;
49
50
opts = opts || { } ;
51
+
52
+ const previousSkipEffects = options [ _skipEffects ] ;
53
+ options [ _skipEffects ] = true ;
54
+
50
55
const res = _renderToString ( vnode , context , opts ) ;
51
56
// options._commit, we don't schedule any effects in this library right now,
52
57
// so we can pass an empty queue to this hook.
53
58
if ( options . __c ) options . __c ( vnode , EMPTY_ARR ) ;
59
+ options [ _skipEffects ] = previousSkipEffects ;
54
60
return res ;
55
61
}
56
62
You can’t perform that action at this time.
0 commit comments