diff --git a/playground/playground.js b/playground/playground.js index bc880b68..8e69f150 100644 --- a/playground/playground.js +++ b/playground/playground.js @@ -751,6 +751,9 @@ injected @context. */ if(remoteDoc.contextUrl) { // TODO: flash link header injection notice on UI + if(typeof remoteDoc.document === 'string') { + remoteDoc.document = JSON.parse(remoteDoc.document); + } if(Array.isArray(remoteDoc.document)) { remoteDoc.document = { '@context': remoteDoc.contextUrl, @@ -763,6 +766,8 @@ obj[key] = remoteDoc.document[key]; } remoteDoc.document = obj; + } else { + console.error("remoteDoc.document: unknown type"); } } success(remoteDoc.document);