Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes strings updated by WebUI are not picked up by mf() on the server #267

Open
merio opened this issue Oct 20, 2017 · 0 comments
Open

Comments

@merio
Copy link

merio commented Oct 20, 2017

Using preview 23, sometimes when a string is changed through the Web UI, any call to mf() on the server doesn't pick up the changes and uses the string cached in mfPkg.compiled.

I've tracked down the bug and it looks like this happens if a string has an mtime less than the updatedAt of its language at the moment of the change. Doing some debugging using node inspector on the server, the changed function in ObserveFrom never gets triggered:

}, changed: function(doc) {

I guess this is because the actual string is not observed for changes since its not observed by the query, which is constrained by the mtime calculated previously

var query = {mtime: {$gt: mtime}};

For now, as a workaround, I'm adding an observer for the whole collection in /lib at the moment of initialization and copying the added/changed functions from msgfmt.js, but of course that's suboptimal and not really sure if it could have any side effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant