Nevermind.
I was not staring at the mystery block of code with enough focus and brainpower. It had some incorrect and conditional logic that was running when it should not have been running and one of the side-effects of that was to overwrite the translated strings with english. Since I had turned off the particular feature I was not paying any attention to the code that made it work.
(original message)
I am seeing strange behavior:
I execute the following:
console.log("here 3: ",xlated);
await ephemeral_lcliz_cache.setIn([tk, locale_id.value], xlated);
console.log("here 4: ",ephemeral_lcliz_cache.value[tk]?.[locale_id.value]);
And the console.log shows this:
here 3: parcourir le portefeuille
here 4: browse the portfolio
More detail:
- xlated contains a french string.
- PRIOR to the execution of
await ephemeral_lcliz_cache.setIn
the value ofephemeral_lcliz_cache.value[tk]?.[locale_id.value]
is the english string.
The setIn appears to have no effect. This code had been working when, prior to a setIn, the variable ephemeral_lcliz_cache
did not contain any existing value for the key pair [tk].[locale_id.value]
.
Is there some problem with replacing an existing variable element? This is what the data structure looks like: