File tree Expand file tree Collapse file tree 2 files changed +5
-18
lines changed
tests/hydration/samples/whitespace-at-block-start Expand file tree Collapse file tree 2 files changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ export function hydrate(component, options) {
142142 }
143143 if ( error !== HYDRATION_ERROR ) {
144144 // eslint-disable-next-line no-console
145- console . error ( 'Failed to hydrate: ' , error ) ;
145+ console . warn ( 'Failed to hydrate: ' , error ) ;
146146 }
147147
148148 if ( options . recover === false ) {
Original file line number Diff line number Diff line change 11import { test } from '../../test' ;
22
3- /** @type {string[] } */
4- let logs = [ ] ;
5- /** @type {typeof console['error'] } */
6- let console_error ;
7-
83export default test ( {
9- before_test ( ) {
10- console_error = console . error ;
11- console . error = ( ...args ) => logs . push ( args . join ( '' ) ) ;
12- } ,
13- after_test ( ) {
14- console . error = console_error ;
15- } ,
16- test ( { deepEqual } ) {
17- deepEqual ( logs , [
18- "Failed to hydrate: HierarchyRequestError: Node can't be inserted in a #text parent."
19- ] ) ;
20- }
4+ errors : [
5+ 'Failed to hydrate: ' ,
6+ new DOMException ( "Node can't be inserted in a #text parent." , 'HierarchyRequestError' )
7+ ]
218} ) ;
You can’t perform that action at this time.
0 commit comments