From 6199d64d6ac621764de34c4713e692b4bbc913db Mon Sep 17 00:00:00 2001 From: Andrew Mensky Date: Wed, 14 Mar 2018 21:21:14 +0200 Subject: [PATCH] Fix parsing index compound keys #48 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 029571e..67ee156 100644 --- a/index.js +++ b/index.js @@ -129,7 +129,7 @@ function beautify(error, collection, values, messages, defaultMessage) { var matches = errorRegex.exec(error.message); if (matches) { - var indexName = matches[1]; + var indexName = matches[1].split('$').pop(); // Retrieve that index's list of fields onSuberrors = getIndexes(collection).then(function (indexes) {