Skip to content

Commit

Permalink
Fix singleValue component, fix #361
Browse files Browse the repository at this point in the history
Controller cannot be arrow function.
  • Loading branch information
arildm committed May 13, 2024
1 parent ebf37c3 commit ddfd3da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
- Update number formatting in statistics table when switching language
- Disable Trend diagram and Map buttons while waiting for statistics search to finish [#346](https://github.com/spraakbanken/korp-frontend/issues/346)
- Error when clicking trend diagram with multiple series [#358](https://github.com/spraakbanken/korp-frontend/issues/358)
- Broken singleValue component [#361](https://github.com/spraakbanken/korp-frontend/issues/361)
- Strip HTML from total hits in annotated KWIC dowload
- Fix dynamic translation for tabs, filters etc
- Modes in "More" menu sorted locale-awarely
Expand Down
7 changes: 6 additions & 1 deletion app/scripts/extended.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,12 @@ export default _.merge(
// puts the first values from a dataset paramater into model
singleValue: {
template: '<input type="hidden">',
controller: ["$scope", ($scope) => ($scope.model = _.values($scope.dataset)[0])],
controller: [
"$scope",
function ($scope) {
$scope.model = _.values($scope.dataset)[0]
},
],
},
default: {
template: _.template(`\
Expand Down

0 comments on commit ddfd3da

Please sign in to comment.