@pistonite/pure 0.0.14 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pistonite/pure",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "Pure TypeScript libraries for my projects",
5
5
  "homepage": "https://github.com/Pistonite/pure",
6
6
  "bugs": {
@@ -259,7 +259,7 @@ export const addLocaleSubscriber = (
259
259
  */
260
260
  export const detectLocale = {
261
261
  type: "languageDetector" as const,
262
- detect: () => locale,
262
+ detect: (): string => locale.get(),
263
263
  cacheUserLanguage: (lng: string): void => {
264
264
  setLocale(lng);
265
265
  },
@@ -86,10 +86,10 @@ class PersistImpl<T> implements Persist<T> {
86
86
  const loadedValue = deserialize(data);
87
87
  if (loadedValue !== null) {
88
88
  value = loadedValue;
89
- this.cell.set(value);
90
89
  }
91
90
  }
92
91
  } catch {}
92
+ this.cell.set(value);
93
93
  this.unsubscribe = this.cell.subscribe((value) => {
94
94
  this.storage.setItem(this.key, serialize(value));
95
95
  });