Skip to content

Conversation

@pflarr
Copy link

@pflarr pflarr commented Jun 8, 2017

workingFilters was defined in the scope of 'showFilter', but used outside that scope. It mostly worked, except when searching and then selecting filters. In that case, the workingFilters was set as an implicitly defined global, and the changes weren't picked up when 'OK' is clicked.

  • Moved the definition of workingFilters to the HeaderFilter() scope, which contains all the functions that use it.
  • Renamed workingFilters in the changeWorkingFilter function to baseWorkingFilter, to make it clear that we're working with a locally passed argument instead of the higher scoped workingFilters.

workingFilters was defined in the scope of 'showFilter', but used outside that scope. It mostly worked, except when searching and then selecting filters. In that case, the workingFilters was set as an implicitly defined global, and the changes weren't picked up when 'OK' is clicked. 
 - Moved the definition of workingFilters to the HeaderFilter() scope, which contains all the functions that use it.
 - Renamed workingFilters in the changeWorkingFilter function to baseWorkingFilter, to make it clear that we're working with a locally passed argument instead of the higher scoped workingFilters.
@akundzich
Copy link

This update must be taken as a final master version of the plugin.
I just spent some time fixing the same issue with workingFilters and it could be avoided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants