Merge pull request #4168 from ltegman/fix/code-editor-spamming-browser-history-4167
Fix Code Editor Changes Creating Duplicate History Entries
This commit is contained in:
		@@ -136,8 +136,16 @@ common.codeUri = (function(common, encode, decode, location, history) {
 | 
				
			|||||||
      if (!codeUri.enabled) {
 | 
					      if (!codeUri.enabled) {
 | 
				
			||||||
        return null;
 | 
					        return null;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      location.hash = '?solution=' +
 | 
					      if (history && typeof history.replaceState === 'function') {
 | 
				
			||||||
        codeUri.encode(encodeFcc(solution));
 | 
					        history.replaceState(
 | 
				
			||||||
 | 
					          history.state,
 | 
				
			||||||
 | 
					          null,
 | 
				
			||||||
 | 
					          '?solution=' + codeUri.encode(encodeFcc(solution))
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        location.hash = '?solution=' +
 | 
				
			||||||
 | 
					          codeUri.encode(encodeFcc(solution));
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      return solution;
 | 
					      return solution;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user