Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Commit

Permalink
Merge pull request #266 from accordproject/dl-inVariable-check
Browse files Browse the repository at this point in the history
fix(inVariable): update check for inVariable to handle edge cases - 265
  • Loading branch information
DianaLease authored Jan 13, 2020
2 parents 8c0d38d + b79d2e1 commit 61ad123
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 111 deletions.
6 changes: 4 additions & 2 deletions demo/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@ function Demo() {

const fetchTemplateObj = async (uri) => {
try {
const template = await Template.fromUrl(uri);
setTemplateObj({ ...templateObj, [uri]: template });
if (!templateObj[uri]) {
const template = await Template.fromUrl(uri);
setTemplateObj({ ...templateObj, [uri]: template });
}
} catch (err) {
console.log(err);
}
Expand Down
Loading

0 comments on commit 61ad123

Please sign in to comment.