Skip to content

Commit

Permalink
Update if_messages.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellacosse authored Jan 25, 2024
1 parent fe1a0b2 commit 1579be1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/server_manager/web_app/ui_components/if_messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,22 @@ import {customElement, property} from 'lit/decorators.js';

@customElement('if-messages')
export class IfMessages extends LitElement {
@property({type: String, attribute: 'message-ids'}) messageIDs = '';
@property({
type: Array,
attribute: 'message-ids',
converter: value => value.split(/,\s*/)
}) messageIDs = '';
@property({type: Function, attribute: 'localize'}) localize: (
msgId: string,
...params: string[]
) => string;

render() {
if (this.messageIDs.split(/,\s*/).some((id) => this.localize(id) === id)) {
if (this.messageIDs.some((id) => {
const result = this.localize(id);

return result === id || result === undefined || result === '';
}) {

Check notice

Code scanning / CodeQL

Syntax error Note

Error: ')' expected.
return nothing;
}

Expand Down

0 comments on commit 1579be1

Please sign in to comment.