diff --git a/api/wasm/indigo-ketcher/indigo-ketcher.cpp b/api/wasm/indigo-ketcher/indigo-ketcher.cpp index a645547004..94e7b7dfb3 100644 --- a/api/wasm/indigo-ketcher/indigo-ketcher.cpp +++ b/api/wasm/indigo-ketcher/indigo-ketcher.cpp @@ -540,10 +540,10 @@ namespace indigo input_format = it->second; bool use_document = false; - if ((input_format == "ket" || input_format == "application/json") && outputFormat.size() > 0 && - (outputFormat == "sequence" || outputFormat == "chemical/x-sequence" || "chemical/x-peptide-sequence-3-letter" || outputFormat == "fasta" || - outputFormat == "chemical/x-fasta" || outputFormat == "idt" || outputFormat == "chemical/x-idt" || outputFormat == "helm" || - outputFormat == "chemical/x-helm")) + static const std::set document_formats{ + "sequence", "chemical/x-sequence", "chemical/x-peptide-sequence-3-letter", "fasta", "chemical/x-fasta", "idt", "chemical/x-idt", + "helm", "chemical/x-helm"}; + if ((input_format == "ket" || input_format == "application/json") && outputFormat.size() > 0 && document_formats.count(outputFormat) > 0) use_document = true; IndigoKetcherObject iko = loadMoleculeOrReaction(data, options_copy, library, use_document);