universal-resolver-frontend icon indicating copy to clipboard operation
universal-resolver-frontend copied to clipboard

UI breaks if the value of "serviceEndpoint" is an object

Open peacekeeper opened this issue 4 years ago • 0 comments

The frontend UI incorrectly assumes that the value of serviceEndpoint is always a string. It should also be able to handle cases where the value is an object (see Service Endpoints in DID Core).

E.g. if a DID document contains this:

		"service": [{
			"id": "PersonalInfo",
			"type": "AgentService",
			"serviceEndpoint": {
				"type": "UserServiceEndpoint"
			}
		}],

then React gives the following error:

Objects are not valid as a React child (found: object with keys {type}). If you meant to render a collection of children, use an array instead.

peacekeeper avatar Sep 11 '20 10:09 peacekeeper