From b43f306d6bccd0c65177ebd2040df8489eb70580 Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Fri, 18 Aug 2023 17:07:11 +0530 Subject: [PATCH] chore: fix json detection issue when importing --- packages/ui-services/src/Import/Importer.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/ui-services/src/Import/Importer.ts b/packages/ui-services/src/Import/Importer.ts index 7abc9defd..66ed34093 100644 --- a/packages/ui-services/src/Import/Importer.ts +++ b/packages/ui-services/src/Import/Importer.ts @@ -54,10 +54,6 @@ export class Importer { return 'evernote' } - if (file.type === 'application/json' && this.superConverterService.isValidSuperString(content)) { - return 'super' - } - try { const json = JSON.parse(content) @@ -76,6 +72,10 @@ export class Importer { /* empty */ } + if (file.type === 'application/json' && this.superConverterService.isValidSuperString(content)) { + return 'super' + } + if (PlaintextConverter.isValidPlaintextFile(file)) { return 'plaintext' }