Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/GleapSession.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <html lang> 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++) {
Expand Down
Loading