MCPcopy
hub / github.com/angular-ui/ui-router / skipEmptyAndUnknownOptions

Function skipEmptyAndUnknownOptions

test/angular/1.4/angular.js:27231–27248  ·  view source on GitHub ↗
(current)

Source from the content-addressed store, hash-verified

27229
27230
27231 function skipEmptyAndUnknownOptions(current) {
27232 var emptyOption_ = emptyOption && emptyOption[0];
27233 var unknownOption_ = unknownOption && unknownOption[0];
27234
27235 // We cannot rely on the extracted empty option being the same as the compiled empty option,
27236 // because the compiled empty option might have been replaced by a comment because
27237 // it had an "element" transclusion directive on it (such as ngIf)
27238 if (emptyOption_ || unknownOption_) {
27239 while (current &&
27240 (current === emptyOption_ ||
27241 current === unknownOption_ ||
27242 current.nodeType === NODE_TYPE_COMMENT ||
27243 (nodeName_(current) === 'option' && current.value === ''))) {
27244 current = current.nextSibling;
27245 }
27246 }
27247 return current;
27248 }
27249
27250
27251 function updateOptions() {

Callers 1

updateOptionsFunction · 0.85

Calls 1

nodeName_Function · 0.70

Tested by

no test coverage detected