Skip to content

Commit

Permalink
fix(interimElement): added variable declaration in findParent()
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBurleson authored and kennethcachia committed Sep 23, 2015
1 parent 1b40c8b commit b836282
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/services/interimElement/interimElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,17 +491,17 @@ function InterimElementProvider() {
* Search for parent at insertion time, if not specified
*/
function findParent(element, options) {
var parent = options.parent;

// Search for parent at insertion time, if not specified
if (angular.isFunction(options.parent)) {
parent = options.parent(options.scope, element, options);
} else if (angular.isString(options.parent)) {
parent = angular.element($document[0].querySelector(options.parent));
if (angular.isFunction(parent)) {
parent = parent(options.scope, element, options);
} else if (angular.isString(parent)) {
parent = angular.element($document[0].querySelector(parent));
} else {
parent = angular.element(options.parent);
parent = angular.element(parent);
}


// If parent querySelector/getter function fails, or it's just null,
// find a default.
if (!(parent || {}).length) {
Expand Down

0 comments on commit b836282

Please sign in to comment.