Improve code as per Sonar suggestions (#22224)

This commit is contained in:
Michael Telatynski 2022-05-16 16:47:12 +01:00 committed by GitHub
parent 0292f66365
commit ca98529bd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 465 additions and 331 deletions

View file

@ -74,7 +74,7 @@ const ack = (ev: CustomEvent<IWidgetApiRequest>) => widgetApi.transport.reply(ev
if (!optional && vals.length !== 1) {
throw new Error(`Expected singular ${name} in query string`);
}
return <string>vals[0];
return vals[0];
};
// If we have these params, expect a widget API to be available (ie. to be in an iframe