mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(electron): fix production build crashes
This commit is contained in:
@@ -17,8 +17,8 @@ const ipfsClientLinuxPath = path.join(ipfsClientsPath, 'linux');
|
||||
// const ipfsClientMacUrl = `https://github.com/plebbit/kubo/releases/download/v${ipfsClientVersion}/ipfs-darwin-amd64`
|
||||
// const ipfsClientLinuxUrl = `https://github.com/plebbit/kubo/releases/download/v${ipfsClientVersion}/ipfs-linux-amd64`
|
||||
|
||||
// official kubo download links https://docs.ipfs.tech/install/command-line/#install-official-binary-distributions
|
||||
const ipfsClientVersion = '0.32.1';
|
||||
// NOTE: Keep this version in sync with the kubo version in package.json to avoid repo version mismatches
|
||||
const ipfsClientVersion = '0.39.0';
|
||||
|
||||
// Resolve desired build arch: allow overriding via env (so cross-arch builds pick correct binary)
|
||||
const resolveBuildArch = () => {
|
||||
|
||||
+8
-1
@@ -18,7 +18,14 @@
|
||||
</script>
|
||||
<script>
|
||||
// Redirect non-hash URLs to hash URLs on initial load
|
||||
if (window.location.pathname && window.location.pathname !== '/' && window.location.pathname !== '/index.html' && !window.location.hash) {
|
||||
// Skip redirect for file:// protocol (Electron) or if pathname ends with index.html
|
||||
if (
|
||||
window.location.protocol !== 'file:' &&
|
||||
window.location.pathname &&
|
||||
window.location.pathname !== '/' &&
|
||||
!window.location.pathname.endsWith('/index.html') &&
|
||||
!window.location.hash
|
||||
) {
|
||||
window.location.replace('/#' + window.location.pathname + window.location.search);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user