| Index: pkg/template_binding/lib/src/element.dart
|
| diff --git a/pkg/template_binding/lib/src/element.dart b/pkg/template_binding/lib/src/element.dart
|
| index bf9a036123ae94b34be2ee5f0f9381d4fbcf3e0e..6d82baaf4a2bd8aa3f6fda3051b131174a6ce637 100644
|
| --- a/pkg/template_binding/lib/src/element.dart
|
| +++ b/pkg/template_binding/lib/src/element.dart
|
| @@ -9,8 +9,6 @@ class _ElementExtension extends NodeBindExtension {
|
| _ElementExtension(Element node) : super._(node);
|
|
|
| bind(String name, value, {bool oneTime: false}) {
|
| - _self.unbind(name);
|
| -
|
| Element node = _node;
|
|
|
| if (node is OptionElement && name == 'value') {
|
| @@ -31,7 +29,7 @@ class _ElementExtension extends NodeBindExtension {
|
|
|
| _open(value, (x) => _updateAttribute(_node, name, conditional, x));
|
| }
|
| - return bindings[name] = value;
|
| + return _maybeUpdateBindings(name, value);
|
| }
|
|
|
| void _updateOption(newValue) {
|
| @@ -40,10 +38,13 @@ class _ElementExtension extends NodeBindExtension {
|
| var selectBinding = null;
|
| var select = node.parentNode;
|
| if (select is SelectElement) {
|
| - var valueBinding = nodeBind(select).bindings['value'];
|
| - if (valueBinding is _InputBinding) {
|
| - selectBinding = valueBinding;
|
| - oldValue = select.value;
|
| + var bindings = nodeBind(select).bindings;
|
| + if (bindings != null) {
|
| + var valueBinding = bindings['value'];
|
| + if (valueBinding is _InputBinding) {
|
| + selectBinding = valueBinding;
|
| + oldValue = select.value;
|
| + }
|
| }
|
| }
|
|
|
|
|