Skip to content

Commit 1260ded

Browse files
authored
fix(examples): application crashed when navigating examples in browser (#5938)
fix(examples): application crashed when navigating examples in browser (#5938)
1 parent bba8e2e commit 1260ded

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ server = http.createServer(function (req, res) {
128128
// Process server request
129129
else if (new RegExp('(' + dirs.join('|') + ')\/server').test(url)) {
130130
if (fs.existsSync(path.join(__dirname, url + '.js'))) {
131-
import('./' + url + '.js').then(module => {
132-
module.default(req, res)
131+
import('file://' + path.join(__dirname, url + '.js')).then((server) => {
132+
server.default(req, res);
133133
});
134134
} else {
135135
send404(res);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy