Skip to content

Commit

Permalink
fix(options): convert to array to be safe
Browse files Browse the repository at this point in the history
  • Loading branch information
rowasc committed Dec 4, 2020
1 parent 57f1614 commit 92521fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ushahidi-platform-sdk",
"version": "v0.3.5",
"version": "v0.3.6",
"description": "An SDK for the Ushahidi Platform - V3+ compatible",
"engines": {
"node": ">= 10 <13"
Expand Down
2 changes: 1 addition & 1 deletion src/surveys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class Surveys {
}

static fieldHasTranslations = (field, lang) => {
return field.translations[lang] && field.translations[lang].options && field.translations[lang].options.length > 0;
return field.translations[lang] && field.translations[lang].options && Object.values(field.translations[lang].options).length > 0;
}

static fieldCanHaveOptions = (field) => {
Expand Down

0 comments on commit 92521fb

Please sign in to comment.