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) {
7272 // This is just to get subcompilation working with Next.js's fast refresh
7373 let previousRefreshReg = global . $RefreshReg$ ;
7474 let previousRefreshSig = global . $RefreshSig$ ;
75- let previousDocument = global . $RefreshSig$ ;
75+ let previousDocument = global . document ;
7676 let previousElement = global . Element ;
7777 // https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/176#issuecomment-683150213
7878 global . $RefreshReg$ = noop ;
7979 global . $RefreshSig$ = ( ) => noop ;
80- global . document = { querySelector : noop } ;
80+ global . document = previousDocument || {
81+ querySelector : noop ,
82+ querySelectorAll : noop ,
83+ } ;
8184 global . Element = class Element { } ;
8285
8386 // This imports the config as an in-memory object
@@ -100,6 +103,8 @@ async function load(source) {
100103 } ;
101104
102105 const errors = Markdoc . validate ( ast , cfg )
106+ // tags are not yet registered, so ignore these errors
107+ . filter ( ( e ) => e . error . id !== 'tag-undefined' )
103108 . filter ( ( e ) => {
104109 switch ( e . error . level ) {
105110 case 'debug' :
You can’t perform that action at this time.
0 commit comments