From cba11997deb249c658c562b344ab0b0b6297b64e Mon Sep 17 00:00:00 2001 From: Satyadeep Date: Wed, 26 Aug 2020 21:19:45 +0530 Subject: [PATCH] Fix for default operators getting overwritten by options.whitelist instead of concat (#108) * Fix for options.whitelist getting overwritten instead of concat * Fixed issue with the whitelist option Co-authored-by: Dekel Barzilay --- src/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index b8679ce..264bc77 100644 --- a/src/index.js +++ b/src/index.js @@ -84,11 +84,9 @@ class Service extends AdapterService { } const whitelist = Object.values(OPERATORS).concat(options.whitelist || []); + const id = options.model.idColumn || 'id'; - super(Object.assign({ - id: options.model.idColumn || 'id', - whitelist - }, options)); + super(Object.assign({ id }, options, { whitelist })); this.idSeparator = options.idSeparator || ','; this.jsonSchema = options.model.jsonSchema;