Skip to content

Commit ab9267f

Browse files
authored
Disable Elements unblinding in the server-side rendering environment (#466)
Attempting to access the URL hash fragment (`location.hash`) on the server-side was causing an error, because it is not available there. Unblinding should only be done on the client-side for privacy reasons anyway, so this feature can be disabled entirely on the server-side.
1 parent a9499f8 commit ab9267f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/src/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default function main({ DOM, HTTP, route, storage, scanner: scan$, search
5858
, sort_dir: loc.query.sort_dir != null ? loc.query.sort_dir : 'asc'
5959
, limit: +loc.query.limit || 50,
6060
}))
61-
, blindingReq$ = !process.env.IS_ELEMENTS ? O.empty()
61+
, blindingReq$ = !(process.env.IS_ELEMENTS && process.browser) ? O.empty()
6262
: page$.map(loc => loc.hash.startsWith('#blinded=') ? loc.hash.substr(9) : null)
6363
// End Elements only
6464

0 commit comments

Comments
 (0)