Fix: #416 フィルターでhalf_warnを指定した時の代替値指定ミス (#423)

This commit is contained in:
KMY(雪あすか) 2024-01-05 09:07:48 +09:00 committed by GitHub
parent 98753287ac
commit 2c5c068365
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -837,7 +837,7 @@ const startServer = async () => {
// representing a value in an enum defined by Ruby on Rails:
//
// enum { warn: 0, hide: 1, half_warn: 2 }
filter_action: ['warn', 'hide', 'half_warn'][Math.min(filter.filter_action, 1)],
filter_action: filter.filter_action === 2 ? 'warn' : ['warn', 'hide', 'half_warn'][filter.filter_action],
filter_action_ex: ['warn', 'hide', 'half_warn'][filter.filter_action],
with_quote: filter.with_quote,
excludeFollows: filter.exclude_follows,