mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
ERC:721 check for key already present changed
Signed-off-by: Rajat Sharma <connecttorajat@outlook.com>
This commit is contained in:
parent
e00841bd10
commit
194aff808d
1 changed files with 1 additions and 1 deletions
|
|
@ -312,7 +312,7 @@ class TokenERC721Contract extends Contract {
|
|||
|
||||
//check contract options are not already set, client is not authorized to change them once intitialized
|
||||
const nameBytes = await ctx.stub.getState(nameKey);
|
||||
if (!nameBytes || nameBytes.length !== 0) {
|
||||
if (nameBytes && nameBytes.length > 0) {
|
||||
throw new Error('contract options are already set, client is not authorized to change them');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue