Skip to content

Commit

Permalink
chore(core): modify tsconfig and modify debug key
Browse files Browse the repository at this point in the history
  • Loading branch information
pubuzhixing8 committed Aug 17, 2021
1 parent b1af93e commit 1baa789
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
9 changes: 3 additions & 6 deletions packages/src/components/editable/editable.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ import { HistoryEditor } from 'slate-history';
import { isDecoratorRangeListEqual } from '../../utils';
import { check, normalize } from '../../utils/global-normalize';

const timeDebug = Debug('slate-time');
const checkTimeSpy = Debug('slate-check-time');
const timeDebug = Debug('slate-angular-time');
// COMPAT: Firefox/Edge Legacy don't support the `beforeinput` event
// Chrome Legacy doesn't support `beforeinput` correctly
const HAS_BEFORE_INPUT_SUPPORT =
Expand Down Expand Up @@ -363,11 +362,11 @@ export class SlateEditableComponent implements OnInit, OnChanges, OnDestroy, Aft
}

ngAfterViewChecked() {
checkTimeSpy('editable ngAfterViewChecked');
timeDebug('editable ngAfterViewChecked');
}

ngDoCheck() {
checkTimeSpy('editable ngDoCheck');
timeDebug('editable ngDoCheck');
}

forceFlush() {
Expand Down Expand Up @@ -480,7 +479,6 @@ export class SlateEditableComponent implements OnInit, OnChanges, OnDestroy, Aft
) {
const editor = this.editor;
if (!this.readonly && hasEditableTarget(editor, event.target) && !this.isDOMEventHandled(event, this.beforeInput)) {
timeDebug('with intent start beforeinput');
try {
const { selection } = editor;
const { inputType: type } = event;
Expand Down Expand Up @@ -582,7 +580,6 @@ export class SlateEditableComponent implements OnInit, OnChanges, OnDestroy, Aft
} catch (error) {
this.editor.onError({ code: SlateErrorCode.OnDOMBeforeInputError, nativeError: error });
}
timeDebug('with intent end beforeinput');
}
}

Expand Down
3 changes: 2 additions & 1 deletion packages/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"types": [
"jasmine",
"node"
]
],
"target": "es5",
},
"files": [
"src/test.ts"
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"types": [
"jasmine",
"node"
]
],
"target": "es5",
},
"files": [
"demo/test.ts",
Expand Down

0 comments on commit 1baa789

Please sign in to comment.