0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00

fix select option value issue (#291)

This commit is contained in:
cayasso 2017-02-24 15:44:12 -06:00
parent b31ecc5649
commit 1d4264c338

View File

@ -142,7 +142,11 @@ export default function addElementAttributes ( generator, node, local ) {
}
if ( isBoundOptionValue ) {
( dynamic ? local.update : local.init ).addLine( `${local.name}.value = ${local.name}.__value` );
local.init.addLine( `${local.name}.value = ${local.name}.__value` );
if (dynamic) {
local.update.addLine( `${local.name}.value = ${local.name}.__value` );
}
}
}