From da6b6535d1a195349445a56d82984c804699a5de Mon Sep 17 00:00:00 2001 From: Julien Lamy Date: Mon, 14 Mar 2016 15:06:18 +0100 Subject: [PATCH] Fix dictionary creation --- src/lib/javascript/JavascriptVM.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/javascript/JavascriptVM.cpp b/src/lib/javascript/JavascriptVM.cpp index ed7c4488..ceffd6ee 100644 --- a/src/lib/javascript/JavascriptVM.cpp +++ b/src/lib/javascript/JavascriptVM.cpp @@ -91,6 +91,11 @@ ::JavascriptVM() for(auto it = odil::registry::public_dictionary.begin(); it != odil::registry::public_dictionary.end(); ++it) { + if(it->first.get_type() != odil::ElementsDictionaryKey::Type::Tag) + { + continue; + } + if (!first) { dictionary_as_json << ","; @@ -100,7 +105,7 @@ ::JavascriptVM() dictionary_as_json << "\"" << it->second.keyword << "\": [\"" << it->second.vr - << "\",\"" << std::string(it->first) << "\"]"; + << "\",\"" << std::string(it->first.get_tag()) << "\"]"; } dictionary_as_json << "}";