Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit 2f909f6

Browse files
committed
cleanup
1 parent b9266f7 commit 2f909f6

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/NodeBind.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
};
9191

9292
function sanitizeValue(value) {
93-
return value === undefined || value === null ? '' : value;
93+
return value == null ? '' : value;
9494
}
9595

9696
function updateText(node, value) {
@@ -315,15 +315,17 @@
315315
function updateOption(option, value) {
316316
var parentNode = option.parentNode;;
317317
var select;
318+
var selectBinding;
319+
var oldValue;
318320
if (parentNode instanceof HTMLSelectElement &&
319321
parentNode.bindings &&
320322
parentNode.bindings.value) {
321323
select = parentNode;
322-
var selectBinding = select.bindings.value;
323-
var oldValue = select.value;
324+
selectBinding = select.bindings.value;
325+
oldValue = select.value;
324326
}
325327

326-
option.value = sanitizeValue(value);;
328+
option.value = sanitizeValue(value);
327329

328330
if (select && select.value != oldValue) {
329331
selectBinding.setValue(select.value);

0 commit comments

Comments
 (0)