Incorrect data type used in AJAX requests for search requests
authorAlexander Ebert <ebert@woltlab.com>
Fri, 15 Oct 2021 15:23:06 +0000 (17:23 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 15 Oct 2021 15:23:06 +0000 (17:23 +0200)
The `Set` type is not understood by the browser's AJAX API and thus silently discarded.

ts/WoltLabSuite/Core/Ui/Search/Input.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Input.js

index 39ffd5fd7cf05225cab0423e94617f74a07e08b3..238e5aa5d8f0f0f32876102805e7b4d219ab884d 100644 (file)
@@ -196,7 +196,7 @@ class UiSearchInput {
     return {
       parameters: {
         data: {
-          excludedSearchValues: this.excludedSearchValues,
+          excludedSearchValues: Array.from(this.excludedSearchValues),
           searchString: value,
         },
       },
index 2c808fa7b72f6d0cbd892d1f3562bc0c0bfe9ddc..a785b2f353a84a8fbd4526a4c874d05fd2321b1d 100644 (file)
@@ -164,7 +164,7 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Core", "../../Dom/Ut
             return {
                 parameters: {
                     data: {
-                        excludedSearchValues: this.excludedSearchValues,
+                        excludedSearchValues: Array.from(this.excludedSearchValues),
                         searchString: value,
                     },
                 },