Skip to content

Commit 52bd292

Browse files
committed
Use ?. for cases where proof or optionalTests are undefined.
1 parent 8455919 commit 52bd292

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

suites/create.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,11 @@ export function runDataIntegrityProofFormatTests({
403403
}
404404
});
405405
}
406-
if(optionalTests.proofChain) {
406+
if(optionalTests?.proofChain) {
407407
it('If "proof.previousProof" property exists, it MUST be a string ' +
408408
'value or unordered list of string values.', function() {
409409
for(const proof of proofs) {
410-
if(proof.previousProof) {
410+
if(proof?.previousProof) {
411411
isStringOrArrayOfStrings(proof.previousProof).should.equal(
412412
true,
413413
'"proof.previousProof" should be a string or an Array of strings.'

0 commit comments

Comments
 (0)