Merge pull request #18 from jclem/reduce-history-pollution
Reduce extra history entries
This commit is contained in:
+1
-1
@@ -35,5 +35,5 @@ export const fromUrl = data => {
|
||||
};
|
||||
export const updateCodeStore = newState => {
|
||||
codeStore.set(newState);
|
||||
push('/edit/' + Base64.encodeURI(JSON.stringify(newState)))
|
||||
replace('/edit/' + Base64.encodeURI(JSON.stringify(newState)))
|
||||
};
|
||||
|
||||
@@ -38,7 +38,7 @@ const handleConfUpdate = conf => {
|
||||
console.log('Error in parsed', e);
|
||||
configErrorStore.set(e);
|
||||
const str = JSON.stringify({ code, mermaid: oldConf });
|
||||
push('/edit/' + Base64.encodeURI(str))
|
||||
replace('/edit/' + Base64.encodeURI(str))
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ const handleCodeUpdate = code => {
|
||||
codeErrorStore.set(e);
|
||||
console.log('Error in parsed', e.hash);
|
||||
const str = JSON.stringify({ code: code, mermaid: conf });
|
||||
push('/edit/' + Base64.encodeURI(str))
|
||||
replace('/edit/' + Base64.encodeURI(str))
|
||||
const l = e.hash.line;
|
||||
decArr.push(edit.deltaDecorations([], [
|
||||
{ range: new monaco.Range(e.hash.loc.first_line,e.hash.loc.last_line,e.hash.loc.first_column,e.hash.loc.last_column), options: { inlineClassName: 'myInlineDecoration' }}]
|
||||
|
||||
Reference in New Issue
Block a user