Commit a1276a65 authored by Mark Boas's avatar Mark Boas
Browse files

save agreement before generating

parent 42c39886
......@@ -441,7 +441,7 @@ class WaterfallAgreement {
}
}
saveAgreement = (el) => {
saveAgreement = () => {
const currencyIndex = document.querySelector("#currency").selectedIndex;
let saveable = true;
......@@ -608,7 +608,11 @@ class WaterfallAgreement {
}
generateAgreement = () => {
let agreement = JSON.parse(localStorage.getItem(this.localStorageId));
// save agreement first, just in case
this.saveAgreement();
const agreement = JSON.parse(localStorage.getItem(this.localStorageId));
if (agreement !== null) {
let rsml = document.querySelector("#js-rsml");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment