Browse Source

guard around `id()`

Jeffrey Morgan 1 year ago
parent
commit
4ab1da38ba
1 changed files with 5 additions and 1 deletions
  1. 5 1
      app/src/index.ts

+ 5 - 1
app/src/index.ts

@@ -236,7 +236,11 @@ app.on('window-all-closed', () => {
 
 // In this file you can include the rest of your app's specific main process
 // code. You can also put them in separate files and import them here.
-const aid = id()
+let aid = ''
+try {
+  aid = id()
+} catch (e) {}
+
 autoUpdater.setFeedURL({
   url: `https://ollama.ai/api/update?os=${process.platform}&arch=${process.arch}&version=${app.getVersion()}&id=${aid}`,
 })