Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(interimElement): added variable declaration in findParent()
Browse files Browse the repository at this point in the history
Fixes #3927. Fixes #3943. Refs #3892.
  • Loading branch information
ThomasBurleson committed Jul 29, 2015
1 parent ce46a9a commit af05235
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 af05235

Please sign in to comment.