@gringow/gringow-react 0.0.5 → 0.0.6

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.
Files changed (2) hide show
  1. package/dist/index.mjs +2 -2
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -143,8 +143,8 @@ function g(strings, ...values) {
143
143
  }
144
144
  });
145
145
  React.useEffect(() => {
146
- if (ref.current) {
147
- ref.current.lang = GringowStore.defaultLanguage;
146
+ if (ref.current && cache[cacheId]) {
147
+ ref.current.lang = ref.current.lang ?? GringowStore.defaultLanguage;
148
148
  ref.current.cacheId = cacheId;
149
149
  ref.current.cache = cache[cacheId];
150
150
  ref.current.flatten = flatten;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gringow/gringow-react",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "React bindings for Gringow AI-powered translation tool",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -27,7 +27,7 @@
27
27
  "dependencies": {
28
28
  "react": "19.1.0",
29
29
  "react-dom": "19.1.0",
30
- "@gringow/gringow": "0.1.1"
30
+ "@gringow/gringow": "0.1.2"
31
31
  },
32
32
  "scripts": {
33
33
  "build": "rm -rf ./dist/* ./tsconfig.tsbuildinfo && tsup",