From 541d2eaa27d9212dd2c651e78d4f005c80b875ea Mon Sep 17 00:00:00 2001 From: mauve Date: Tue, 6 Oct 2020 13:40:12 -0400 Subject: [PATCH] Fix serving theme vars cross platform --- app/protocols/browser-protocol.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/protocols/browser-protocol.js b/app/protocols/browser-protocol.js index eb204e7..8204421 100644 --- a/app/protocols/browser-protocol.js +++ b/app/protocols/browser-protocol.js @@ -1,4 +1,4 @@ -const path = require('path').posix +const path = require('path') const mime = require('mime/lite') const ScopedFS = require('scoped-fs') const { Readable } = require('stream') @@ -24,7 +24,7 @@ module.exports = async function createHandler () { const { pathname, hostname } = parsed const toResolve = path.join(hostname, pathname) - if (toResolve === 'theme/vars.css') { + if ((hostname === 'theme') && (pathname === '/vars.css')) { const statusCode = 200 const themes = Object