Skip to content

Commit 6a88471

Browse files
committed
fix: correctly use the PREVENT_CHANGE_EVENTS_DURING_CD token to gate change events
1 parent bb777e6 commit 6a88471

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

packages/angular/src/lib/nativescript-renderer.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
APP_ROOT_VIEW,
2525
ENABLE_REUSABE_VIEWS,
2626
NATIVESCRIPT_ROOT_MODULE_ID,
27+
PREVENT_CHANGE_EVENTS_DURING_CD,
2728
PREVENT_SPECIFIC_EVENTS_DURING_CD,
2829
WRAP_CD_IN_TRANSACTION,
2930
} from './tokens';
@@ -234,7 +235,7 @@ class NativeScriptRenderer implements Renderer2 {
234235
}) ?? [],
235236
);
236237
private preventChangeEvents =
237-
inject(PREVENT_SPECIFIC_EVENTS_DURING_CD, {
238+
inject(PREVENT_CHANGE_EVENTS_DURING_CD, {
238239
optional: true,
239240
}) ?? false;
240241

@@ -329,7 +330,9 @@ class NativeScriptRenderer implements Renderer2 {
329330
if (view && typeof view.tagName !== 'string') {
330331
try {
331332
view.tagName = view.nodeName || fallback || 'view';
332-
} catch {}
333+
} catch {
334+
// ignore
335+
}
333336
}
334337
return view;
335338
};

0 commit comments

Comments
 (0)