Commit 556cd646 authored by Kyle B. Johnson's avatar Kyle B. Johnson Committed by Kevin Stover

add early return when the selected option is found. Closes #2168. (#2169)

parent ad4c4453
......@@ -33,7 +33,7 @@ class NF_Fields_ListSelect extends NF_Abstracts_List
if( isset( $field[ 'options' ] ) ) {
foreach ($field['options'] as $option ) {
if( ! isset( $option[ 'value' ] ) || $value != $option[ 'value' ] || ! isset( $option[ 'calc' ] ) ) continue;
$value = $option[ 'calc' ];
return $option[ 'calc' ];
}
}
return $value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment