From 5248c81b659cd066559e5d50c6afc866a7b24ae0 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 26 Mar 2020 14:47:55 +0100 Subject: [PATCH] Fix opening a text blob in the code editor --- www/common/cryptpad-common.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index fb28318e7..e6946b99b 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -1970,7 +1970,9 @@ define([ common.fromFileData = JSON.parse(sessionStorage[Constants.newPadFileData]); var _parsed1 = Hash.parsePadUrl(common.fromFileData.href); var _parsed2 = Hash.parsePadUrl(window.location.href); - if (_parsed1.type !== _parsed2.type) { delete common.fromFileData; } + if (_parsed1.hashData.type === 'pad') { + if (_parsed1.type !== _parsed2.type) { delete common.fromFileData; } + } delete sessionStorage[Constants.newPadFileData]; }