Set custom profileName after post

Otherwise next cache get after tab switching still uses original profile
This commit is contained in:
Norbert Renner 2020-02-05 19:59:55 +01:00
parent f1f57ec3ce
commit 07425148ee

View file

@ -86,6 +86,7 @@ BR.Profile = L.Evented.extend({
callback: L.bind(function(err, profileId, profileText) { callback: L.bind(function(err, profileId, profileText) {
$(button).blur(); $(button).blur();
if (!err) { if (!err) {
this.profileName = profileId;
this.cache[profileId] = profileText; this.cache[profileId] = profileText;
if (!this.saveWarningShown) { if (!this.saveWarningShown) {
@ -127,6 +128,7 @@ BR.Profile = L.Evented.extend({
profileText: profileText, profileText: profileText,
callback: function(err, profileId, profileText) { callback: function(err, profileId, profileText) {
if (!err) { if (!err) {
that.profileName = profileId;
that.cache[profileId] = profileText; that.cache[profileId] = profileText;
} }
} }