Skip to content

Commit

Permalink
Change has_open_choice to hasOpenChoice
Browse files Browse the repository at this point in the history
  • Loading branch information
ssoonmi committed Nov 21, 2023
1 parent 07b6371 commit 67a34c1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/extensions/surveys.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ describe('survey display logic', () => {
description: 'This is a question description',
type: 'multiple_choice',
choices: ['Tutorials', 'Product Updates', 'Events', 'Other'],
has_open_choice: true,
hasOpenChoice: true,
},
],
},
Expand Down Expand Up @@ -342,7 +342,7 @@ describe('survey display logic', () => {
description: 'This is a question description',
type: 'single_choice',
choices: ['Surveys', 'Feature flags', 'Analytics', 'Another Feature'],
has_open_choice: true,
hasOpenChoice: true,
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/surveys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ export const createMultipleChoicePopup = (
const surveyQuestionChoices = question.choices
const isSingleChoice = question.type === 'single_choice'
const isOptional = !!question.optional
const hasOpenChoice = !!question.has_open_choice
const hasOpenChoice = !!question.hasOpenChoice

const form = `
<div class="survey-${survey.id}-box">
Expand Down
2 changes: 1 addition & 1 deletion src/posthog-surveys-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export interface RatingSurveyQuestion extends SurveyQuestionBase {
export interface MultipleSurveyQuestion extends SurveyQuestionBase {
type: SurveyQuestionType.SingleChoice | SurveyQuestionType.MultipleChoice
choices: string[]
has_open_choice?: boolean
hasOpenChoice?: boolean
}

export enum SurveyQuestionType {
Expand Down

0 comments on commit 67a34c1

Please sign in to comment.