/
opt
/
canhelp
/
node_modules
/
next
/
dist
/
next-devtools
/
shared
/
/opt/canhelp/node_modules/next/dist/next-devtools/shared
mkdir
upload
Name
Size
Mode
Actions
console-error.d.ts
344
0644
edit
dl
rm
console-error.js
1606
0644
edit
dl
rm
console-error.js.map
1667
0644
edit
dl
rm
deepmerge.d.ts
66
0644
edit
dl
rm
deepmerge.js
1371
0644
edit
dl
rm
deepmerge.js.map
1664
0644
edit
dl
rm
devtools-config-schema.d.ts
175
0644
edit
dl
rm
devtools-config-schema.js
1419
0644
edit
dl
rm
devtools-config-schema.js.map
1763
0644
edit
dl
rm
forward-logs-shared.d.ts
1360
0644
edit
dl
rm
forward-logs-shared.js
2082
0644
edit
dl
rm
forward-logs-shared.js.map
3846
0644
edit
dl
rm
hydration-error.d.ts
100
0644
edit
dl
rm
hydration-error.js
449
0644
edit
dl
rm
hydration-error.js.map
67
0644
edit
dl
rm
react-18-hydration-error.d.ts
311
0644
edit
dl
rm
react-18-hydration-error.js
3016
0644
edit
dl
rm
react-18-hydration-error.js.map
3440
0644
edit
dl
rm
react-19-hydration-error.d.ts
503
0644
edit
dl
rm
react-19-hydration-error.js
3973
0644
edit
dl
rm
react-19-hydration-error.js.map
4710
0644
edit
dl
rm
stack-frame.d.ts
825
0644
edit
dl
rm
stack-frame.js
5738
0644
edit
dl
rm
stack-frame.js.map
8407
0644
edit
dl
rm
types.d.ts
74
0644
edit
dl
rm
types.js
439
0644
edit
dl
rm
types.js.map
67
0644
edit
dl
rm
version-staleness.d.ts
229
0644
edit
dl
rm
version-staleness.js
2190
0644
edit
dl
rm
version-staleness.js.map
2319
0644
edit
dl
rm
webpack-module-path.d.ts
418
0644
edit
dl
rm
webpack-module-path.js
1390
0644
edit
dl
rm
webpack-module-path.js.map
1419
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/next/dist/next-devtools/shared/react-18-hydration-error.js
(3016B)
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { getHydrationWarningType: null, isHydrationError: null, isHydrationWarning: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { getHydrationWarningType: function() { return getHydrationWarningType; }, isHydrationError: function() { return isHydrationError; }, isHydrationWarning: function() { return isHydrationWarning; } }); const _interop_require_default = require("@swc/helpers/_/_interop_require_default"); const _iserror = /*#__PURE__*/ _interop_require_default._(require("../../lib/is-error")); function isHydrationError(error) { return (0, _iserror.default)(error) && (error.message === 'Hydration failed because the initial UI does not match what was rendered on the server.' || error.message === 'Text content does not match server-rendered HTML.'); } function isHydrationWarning(message) { return isHtmlTagsWarning(message) || isTextInTagsMismatchWarning(message) || isTextWarning(message); } // https://github.com/facebook/react/blob/main/packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js used as a reference const htmlTagsWarnings = new Set([ 'Warning: Expected server HTML to contain a matching <%s> in <%s>.%s', 'Warning: Did not expect server HTML to contain a <%s> in <%s>.%s' ]); const textAndTagsMismatchWarnings = new Set([ 'Warning: Expected server HTML to contain a matching text node for "%s" in <%s>.%s', 'Warning: Did not expect server HTML to contain the text node "%s" in <%s>.%s' ]); const textWarnings = new Set([ 'Warning: Text content did not match. Server: "%s" Client: "%s"%s' ]); const getHydrationWarningType = (message)=>{ if (typeof message !== 'string') { // TODO: Doesn't make sense to treat no message as a hydration error message. // We should bail out somewhere earlier. return 'text'; } const normalizedMessage = message.startsWith('Warning: ') ? message : "Warning: " + message; if (isHtmlTagsWarning(normalizedMessage)) return 'tag'; if (isTextInTagsMismatchWarning(normalizedMessage)) return 'text-in-tag'; return 'text'; }; const isHtmlTagsWarning = (message)=>typeof message === 'string' && htmlTagsWarnings.has(message); const isTextInTagsMismatchWarning = (msg)=>typeof msg === 'string' && textAndTagsMismatchWarnings.has(msg); const isTextWarning = (msg)=>typeof msg === 'string' && textWarnings.has(msg); if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') { Object.defineProperty(exports.default, '__esModule', { value: true }); Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=react-18-hydration-error.js.map
Save
cmd:
run