File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,8 @@ function changeKey(newKey) {
100
100
var oldKey = Session . get ( 'mfTransKey' ) ;
101
101
if ( oldKey == newKey ) return ;
102
102
103
+ unsavedDest = null ;
104
+
103
105
saveChange ( destLang , oldKey , $ ( '#mfTransDest' ) . val ( ) ) ;
104
106
105
107
// Temporary, need to turn off preserve
@@ -145,14 +147,16 @@ Template.mfTransLang.onCreated(function() {
145
147
146
148
origOnPopState = window . onpopstate ;
147
149
window . onpopstate = function ( ) {
148
- saveChange ( null , null , unsavedDest ) ;
150
+ if ( unsavedDest !== null )
151
+ saveChange ( null , null , unsavedDest ) ;
149
152
if ( origOnPopState )
150
153
origOnPopState . apply ( this , arguments ) ;
151
154
}
152
155
153
156
origPushState = history && history . pushState ;
154
157
history . pushState = function ( ) {
155
- saveChange ( null , null , unsavedDest ) ;
158
+ if ( unsavedDest !== null )
159
+ saveChange ( null , null , unsavedDest ) ;
156
160
if ( origPushState )
157
161
origPushState . apply ( this , arguments ) ;
158
162
}
You can’t perform that action at this time.
0 commit comments