mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Strict null fixes: updates return type of getMessageFromError, fixes QueryOperationAction props (#24690)
* Chore: updates getMessageFromError return type * Chore: updates the position of incorrectly placed bang operator * Chore: updates typing on dropdown typeahead directive * Chore: updates QueryOperationAction props to require title * Revert "Chore: updates QueryOperationAction props to require title"
This commit is contained in:
parent
25e1238022
commit
ee12f5e742
@ -64,7 +64,7 @@ class AddPermissions extends Component<Props, NewDashboardAclItem> {
|
||||
};
|
||||
|
||||
onPermissionChanged = (permission: SelectableValue<PermissionLevel>) => {
|
||||
this.setState({ permission: permission!.value });
|
||||
this.setState({ permission: permission.value! });
|
||||
};
|
||||
|
||||
onSubmit = async (evt: React.SyntheticEvent) => {
|
||||
|
@ -44,7 +44,7 @@ export function dropdownTypeahead($compile: any) {
|
||||
|
||||
const typeaheadValues = _.reduce(
|
||||
$scope.menuItems,
|
||||
(memo, value, index) => {
|
||||
(memo: any[], value, index) => {
|
||||
if (!value.submenu) {
|
||||
value.click = 'menuItemSelected(' + index + ')';
|
||||
memo.push(value.text);
|
||||
@ -184,7 +184,7 @@ export function dropdownTypeahead2($compile: any) {
|
||||
|
||||
const typeaheadValues = _.reduce(
|
||||
$scope.menuItems,
|
||||
(memo, value, index) => {
|
||||
(memo: any[], value, index) => {
|
||||
if (!value.submenu) {
|
||||
value.click = 'menuItemSelected(' + index + ')';
|
||||
memo.push(value.text);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import _ from 'lodash';
|
||||
|
||||
export function getMessageFromError(err: string | (Error & { data?: any; statusText?: string })): string | null {
|
||||
export function getMessageFromError(err: string | (Error & { data?: any; statusText?: string })): string {
|
||||
if (err && !_.isString(err)) {
|
||||
if (err.message) {
|
||||
return err.message;
|
||||
|
Loading…
Reference in New Issue
Block a user