diff --git a/src/GleapSession.js b/src/GleapSession.js index adf8dc43..97f5f12c 100644 --- a/src/GleapSession.js +++ b/src/GleapSession.js @@ -554,6 +554,13 @@ export default class GleapSession { }; checkIfSessionDataNeedsUpdate = (userData) => { + // Every identify / update sends the active language, so a language switch + // in the app (an change in an SPA, setLanguage) must not be + // skipped as "nothing changed". + if (this.session && this.session.lang && this.session.lang !== GleapTranslationManager.getInstance().getActiveLanguage()) { + return true; + } + if (userData) { var userDataKeys = Object.keys(userData); for (var i = 0; i < userDataKeys.length; i++) {