Comments (5)
That's a good idea, thanks! I didn't expect you to get active so quickly, appreciate that! :)
from tauri-settings.
Could you elaborate what you mean by two settings files?
from tauri-settings.
Sure. I have two instances of SettingsManager
in different modules with different filenames (let's say settings-1.json and settings-2.json) being used in different modules of my (angular) app. They both get initialized at the same time. When the application is started for the first time (i.e. the settings folder doesn't exist yet) only one of the SettingsManager
s is initialized successfullly and the other is unedfined (and the error above is shown).
From how I understood the code of this module, there seems to be a race condition in this try-catch block: ensure-settings-file.ts:29. Both instances of SettingsManager
check if the folder exists, and then both try to create it. But only one can succeed of course.
I was going to try and fix this, but I haven't been able to get Typescript/Angular to accept my local copy of the module.
from tauri-settings.
From how I understood the code of this module, there seems to be a race condition in this try-catch block: ensure-settings-file.ts:29. Both instances of SettingsManager check if the folder exists, and then both try to create it. But only one can succeed of course.
Hmm, will have to investigate. As a temporary fix, perhaps you can initialize the second SettingsManager
once the first one has been initialized using await
or .then()
.
from tauri-settings.
Closing this.
from tauri-settings.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tauri-settings.