Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

orgList is not remapped to lowercase when changing via PATCH route #178

Open
k----n opened this issue Mar 22, 2020 · 0 comments · May be fixed by #179
Open

orgList is not remapped to lowercase when changing via PATCH route #178

k----n opened this issue Mar 22, 2020 · 0 comments · May be fixed by #179

Comments

@k----n
Copy link

k----n commented Mar 22, 2020

The problem lies here:

ghcrawler/lib/crawler.js

Lines 30 to 37 in 0ac1107

_reconfigure(current, changes) {
// ensure the orgList is always lowercase
const orgList = changes.find(patch => patch.path === '/orgList');
if (orgList) {
debug('orgList changed');
this.options.orgList = orgList.value.map(element => element.toLowerCase());
}
}

The path is not only /orgList

const orgList = changes.find(patch => patch.path === '/orgList');

When reassigning this.options.orgList, this.options.orgList.map(element => element.toLowerCase()) should be used and not orgList.value.map(element => element.toLowerCase()).

this.options.orgList = orgList.value.map(element => element.toLowerCase());

@k----n k----n linked a pull request Mar 22, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant