Display the error when opening a document with the wrong app

This commit is contained in:
yflory
2017-02-06 12:43:56 +01:00
parent 6f0d33dc1d
commit 7e7d1f7a16
4 changed files with 9 additions and 2 deletions

View File

@@ -558,7 +558,9 @@ define([
var hjson = JSON.parse(userDoc);
if (typeof (hjson) !== 'object' || Array.isArray(hjson)) {
throw new Error("That realtime document is not compatible with the Code app");
var errorText = Messages.typeError;
Cryptpad.errorLoadingScreen(errorText);
throw new Error(errorText);
}
newDoc = hjson.content;