Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit d0cd310

Browse files
author
Mike England
committed
Fix selectedOption Array
This was accidentally overwritten during testing.
1 parent 9c52fa2 commit d0cd310

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

functions/gravityForms/getGfFormDefaults.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ function getSelectDefaults(options) {
4141
/**
4242
* Get first option with isSelected property.
4343
*/
44-
const selectedOption = [].filter((option) => !!option.isSelected).shift()
44+
const selectedOption = options.filter((option) => !!option.isSelected).shift()
4545

4646
if (selectedOption) {
47-
selectDefault = selectedOption.shift().value
47+
selectDefault = selectedOption.value
4848
}
4949

5050
return selectDefault

0 commit comments

Comments
 (0)