File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -72,12 +72,15 @@ async function load(source) {
72
72
// This is just to get subcompilation working with Next.js's fast refresh
73
73
let previousRefreshReg = global . $RefreshReg$ ;
74
74
let previousRefreshSig = global . $RefreshSig$ ;
75
- let previousDocument = global . $RefreshSig$ ;
75
+ let previousDocument = global . document ;
76
76
let previousElement = global . Element ;
77
77
// https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/176#issuecomment-683150213
78
78
global . $RefreshReg$ = noop ;
79
79
global . $RefreshSig$ = ( ) => noop ;
80
- global . document = { querySelector : noop } ;
80
+ global . document = previousDocument || {
81
+ querySelector : noop ,
82
+ querySelectorAll : noop ,
83
+ } ;
81
84
global . Element = class Element { } ;
82
85
83
86
// This imports the config as an in-memory object
@@ -100,6 +103,8 @@ async function load(source) {
100
103
} ;
101
104
102
105
const errors = Markdoc . validate ( ast , cfg )
106
+ // tags are not yet registered, so ignore these errors
107
+ . filter ( ( e ) => e . error . id !== 'tag-undefined' )
103
108
. filter ( ( e ) => {
104
109
switch ( e . error . level ) {
105
110
case 'debug' :
You can’t perform that action at this time.
0 commit comments