Skip to content

Commit

Permalink
fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Oct 27, 2023
1 parent 564f60d commit d652492
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/posthog-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ export class PostHog {
// While developing, a developer might purposefully _not_ call init(),
// in this case, we would like capture to be a noop.
if (!this.__loaded || !this.sessionPersistence || !this._requestQueue) {
return logger.unintializedWarning('posthog.capture')
return logger.uninitializedWarning('posthog.capture')
}

if (userOptedOut(this)) {
Expand Down Expand Up @@ -1249,7 +1249,7 @@ export class PostHog {
*/
identify(new_distinct_id?: string, userPropertiesToSet?: Properties, userPropertiesToSetOnce?: Properties): void {
if (!this.__loaded || !this.persistence) {
return logger.unintializedWarning('posthog.identify')
return logger.uninitializedWarning('posthog.identify')
}
//if the new_distinct_id has not been set ignore the identify event
if (!new_distinct_id) {
Expand Down Expand Up @@ -1418,7 +1418,7 @@ export class PostHog {
*/
reset(reset_device_id?: boolean): void {
if (!this.__loaded) {
return logger.unintializedWarning('posthog.reset')
return logger.uninitializedWarning('posthog.reset')
}
const device_id = this.get_property('$device_id')
this.persistence?.clear()
Expand Down
2 changes: 1 addition & 1 deletion src/posthog-featureflags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export class PostHogFeatureFlags {
*/
override(flags: boolean | string[] | Record<string, string | boolean>): void {
if (!this.instance.__loaded || !this.instance.persistence) {
return logger.unintializedWarning('posthog.feature_flags.override')
return logger.uninitializedWarning('posthog.feature_flags.override')
}

this._override_warning = false
Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const logger = {
console.error(LOGGER_PREFIX, ...args)
},

unintializedWarning: (methodName: string) => {
uninitializedWarning: (methodName: string) => {
logger.error(`You must initialize PostHog before calling ${methodName}`)
},
}
Expand Down

0 comments on commit d652492

Please sign in to comment.