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

Commit 518a8a6

Browse files
committed
make jshint happy
1 parent ad1baba commit 518a8a6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/ng/directive/select.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,6 @@ var selectDirective = function() {
504504
// Read value now needs to check each option to see if it is selected
505505
selectCtrl.readValue = function readMultipleValue() {
506506
var array = [];
507-
var options = element.find('option')
508507
forEach(element.find('option'), function(option) {
509508
if (option.selected && !option.disabled) {
510509
var val = option.value;
@@ -572,6 +571,7 @@ var optionDirective = ['$interpolate', function($interpolate) {
572571
var interpolateValueFn, interpolateTextFn;
573572

574573
if (isDefined(attr.ngValue)) {
574+
// jshint noempty: false
575575
// Will be handled by registerOption
576576
} else if (isDefined(attr.value)) {
577577
// If the value attribute is defined, check if it contains an interpolation

test/ng/directive/selectSpec.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,7 @@ describe('select', function() {
14881488
optionElements = element.find('option');
14891489
expect(optionElements.length).toEqual(3);
14901490
expect(scope.obj.value).toBe(null);
1491-
expect(element.val()).toBe(prop === 'ngValue' ? '? object:4 ?' : '? string:A ?')
1491+
expect(element.val()).toBe(prop === 'ngValue' ? '? object:4 ?' : '? string:A ?');
14921492
});
14931493

14941494

@@ -1538,7 +1538,7 @@ describe('select', function() {
15381538
optionElements = element.find('option');
15391539
expect(optionElements.length).toEqual(4);
15401540
expect(scope.obj.value).toBe(null);
1541-
expect(element.val()).toBe('? string:A ?')
1541+
expect(element.val()).toBe('? string:A ?');
15421542
});
15431543

15441544

@@ -1631,7 +1631,7 @@ describe('select', function() {
16311631
B.disabled = true;
16321632
scope.$digest();
16331633

1634-
var optionElements = element.find('option');
1634+
optionElements = element.find('option');
16351635
expect(optionElements.length).toEqual(4);
16361636
expect(optionElements[0].value).toEqual(unknownValue(undefined));
16371637

@@ -2034,7 +2034,7 @@ describe('select', function() {
20342034
D.disabled = true;
20352035
scope.$digest();
20362036

2037-
var optionElements = element.find('option');
2037+
optionElements = element.find('option');
20382038
expect(optionElements.length).toEqual(4);
20392039
expect(element[0].value).toBe('');
20402040

0 commit comments

Comments
 (0)