Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai committed Aug 31, 2021
1 parent 6483ae2 commit e8566a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions i18next.js
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,8 @@
res = key;
}

var missingKeyNoValueFallbackToKey = options.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;
var resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;
var updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;

if (usedKey || usedDefault || updateMissing) {
Expand Down Expand Up @@ -816,9 +818,9 @@

var send = function send(l, k, fallbackValue) {
if (_this2.options.missingKeyHandler) {
_this2.options.missingKeyHandler(l, namespace, k, updateMissing ? fallbackValue : res, updateMissing, options);
_this2.options.missingKeyHandler(l, namespace, k, updateMissing ? fallbackValue : resForMissing, updateMissing, options);
} else if (_this2.backendConnector && _this2.backendConnector.saveMissing) {
_this2.backendConnector.saveMissing(l, namespace, k, updateMissing ? fallbackValue : res, updateMissing, options);
_this2.backendConnector.saveMissing(l, namespace, k, updateMissing ? fallbackValue : resForMissing, updateMissing, options);
}

_this2.emit('missingKey', l, namespace, k, res);
Expand Down

0 comments on commit e8566a0

Please sign in to comment.