FIX: Staff action log could not be accessed via link (#22688)

011ba5b9 slightly changed the way the staff-action-log route is activated. It's now possible for `deserializeQueryParam` to be called with a null value, so we need to deal with that case.

This route is currently untested - we'll follow-up with another commit to add some.
This commit is contained in:
David Taylor 2023-07-19 11:40:48 +01:00 committed by GitHub
parent bdd97ff931
commit 125903f682
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ export default class AdminLogsStaffActionLogsRoute extends DiscourseRoute {
}
deserializeQueryParam(value, urlKey, defaultValueType) {
if (urlKey === "filters") {
if (urlKey === "filters" && value) {
return EmberObject.create(JSON.parse(decodeURIComponent(value)));
}