Skip to content

Commit

Permalink
fix: Attempt to fix storybookjs/storybook#9463
Browse files Browse the repository at this point in the history
  • Loading branch information
maxandriani committed Jun 16, 2020
1 parent 83ba0a9 commit 5952660
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 37 deletions.
5 changes: 4 additions & 1 deletion angular.json
Expand Up @@ -158,5 +158,8 @@
}
}
},
"defaultProject": "ngx-google-analytics-sdk"
"defaultProject": "ngx-google-analytics-sdk",
"cli": {
"analytics": "cb79ff66-c50d-40a8-9f71-075d6508beeb"
}
}
60 changes: 30 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -15,10 +15,17 @@ export class GaEventFormInputDirective {
this.gaBind = 'focus';
}

@Input() set gaBind(bind: GaBind) {
@Input()
set gaBind(bind: GaBind) {
if (this.gaEvent) {
this.gaEvent.gaBind = bind;
}
}

get gaBind(): GaBind {
return (this.gaEvent)
? this.gaEvent.gaBind
: null;
}

}
Expand Up @@ -10,15 +10,15 @@ import { GtagFn } from '../types/gtag.type';
})
export class GoogleAnalyticsService {

private get document(): Document {
return this._document;
}
private readonly document: Document;

constructor(
@Inject(NGX_GOOGLE_ANALYTICS_SETTINGS_TOKEN) private readonly settings: IGoogleAnalyticsSettings,
@Inject(DOCUMENT) private readonly _document: any,
@Inject(DOCUMENT) readonly _document: any,
@Inject(NGX_GTAG_FN) private readonly _gtag: GtagFn
) { }
) {
this.document = _document;
}

private throw(err: Error) {
if ((this.settings.ennableTracing || isDevMode()) && console && console.error) {
Expand Down

0 comments on commit 5952660

Please sign in to comment.