Skip to content

Commit

Permalink
fix(resolve): Check result before writing to cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Prash74 committed Dec 6, 2019
1 parent 81d9487 commit cf6a957
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ async function findResolution(did, opts, state) {
result = json.didDocument

// Write DDO to temp cache folder
if (false === isBrowser) {
if (false === isBrowser && result) {
await writeCache(did.identifier, 'ddo.json', JSON.stringify(result))
}
didResolve = true
Expand Down

0 comments on commit cf6a957

Please sign in to comment.