mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
Type fixes
This commit is contained in:
@@ -150,14 +150,13 @@ export default class View<S extends ViewSchema = ViewSchema> extends BullView<S[
|
||||
return;
|
||||
}
|
||||
|
||||
scope = scope || null;
|
||||
timeout = timeout || 2000;
|
||||
|
||||
if (!type) {
|
||||
timeout = void 0;
|
||||
}
|
||||
|
||||
const text = this.getLanguage().translate(label, 'labels', scope);
|
||||
const text = this.getLanguage().translate(label, 'labels', scope || undefined);
|
||||
|
||||
// @ts-ignore
|
||||
Ui.notify(text, type, timeout);
|
||||
|
||||
@@ -201,7 +201,7 @@ export default class BaseFieldView<
|
||||
/**
|
||||
* A mode.
|
||||
*/
|
||||
mode: Mode = 'detail'
|
||||
mode: Mode | undefined = 'detail'
|
||||
|
||||
/**
|
||||
* Search params.
|
||||
@@ -1602,9 +1602,9 @@ export default class BaseFieldView<
|
||||
return {};
|
||||
}
|
||||
|
||||
const data = {};
|
||||
const data = {} as Record<string, any>;
|
||||
|
||||
data[this.name] = (this.$element.val() as string).trim();
|
||||
data[this.name] = (this.$element?.val() as string).trim();
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -1613,7 +1613,7 @@ export default class BaseFieldView<
|
||||
* Fetch search data from DOM.
|
||||
*/
|
||||
fetchSearch(): Record<string, any> | null {
|
||||
const value = this.$element.val().toString().trim();
|
||||
const value = this.$element?.val()?.toString()?.trim();
|
||||
|
||||
if (value) {
|
||||
return {
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
"skipLibCheck": true,
|
||||
"allowJs": true,
|
||||
"checkJs": false,
|
||||
"noEmit": true
|
||||
"noEmit": true,
|
||||
"strictPropertyInitialization": false
|
||||
},
|
||||
"include": [
|
||||
"client/src",
|
||||
|
||||
Reference in New Issue
Block a user