Skip to content

Commit ac761ba

Browse files
committed
index_query only when present
1 parent 0db5479 commit ac761ba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/javascript/js/controllers/action_controller.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ export default class extends Controller {
1616
// Select all checkbox
1717
this.selectedAllTarget.value = this.selectionOptions.itemSelectAllSelectedAllValue
1818

19-
// Encrypted and encoded index query
20-
this.indexQueryTarget.value = this.selectionOptions.itemSelectAllSelectedAllQueryValue
19+
// Encrypted and encoded index query when it is present (index view)
20+
if (this.selectionOptions.itemSelectAllSelectedAllQueryValue) {
21+
this.indexQueryTarget.value = this.selectionOptions.itemSelectAllSelectedAllQueryValue
22+
}
2123

2224
if (this.noConfirmationValue) {
2325
this.formTarget.requestSubmit()

0 commit comments

Comments
 (0)