Skip to content

Commit 78ab9d2

Browse files
authored
Get valid mashlib html file location
In the latest npm, node_modules is flattened, so it shouldn't be located based on the location of solid-server. This solves #1382
1 parent dcc5f90 commit 78ab9d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/handlers/get.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async function handler (req, res, next) {
8989

9090
if (useDataBrowser) {
9191
res.set('Content-Type', 'text/html')
92-
const defaultDataBrowser = _path.join(__dirname, '../../node_modules/mashlib/dist/index.html')
92+
const defaultDataBrowser = require.resolve('mashlib/dist/index.html')
9393
const dataBrowserPath = ldp.dataBrowserPath === 'default' ? defaultDataBrowser : ldp.dataBrowserPath
9494
debug(' sending data browser file: ' + dataBrowserPath)
9595
res.sendFile(dataBrowserPath)

0 commit comments

Comments
 (0)