Skip to content

Commit

Permalink
fix: dataLayer may be undefined if no ID is provided (closes #24)
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Aug 29, 2023
1 parent d307c78 commit f60e47c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/gtag.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export function gtag(..._args: any[]) {
// eslint-disable-next-line prefer-rest-params
window.dataLayer!.push(arguments)
window.dataLayer?.push(arguments)
}

0 comments on commit f60e47c

Please # to comment.