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

Commit af05235

Browse files
fix(interimElement): added variable declaration in findParent()
Fixes #3927. Fixes #3943. Refs #3892.
1 parent ce46a9a commit af05235

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/core/services/interimElement/interimElement.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -491,17 +491,17 @@ function InterimElementProvider() {
491491
* Search for parent at insertion time, if not specified
492492
*/
493493
function findParent(element, options) {
494+
var parent = options.parent;
494495

495496
// Search for parent at insertion time, if not specified
496-
if (angular.isFunction(options.parent)) {
497-
parent = options.parent(options.scope, element, options);
498-
} else if (angular.isString(options.parent)) {
499-
parent = angular.element($document[0].querySelector(options.parent));
497+
if (angular.isFunction(parent)) {
498+
parent = parent(options.scope, element, options);
499+
} else if (angular.isString(parent)) {
500+
parent = angular.element($document[0].querySelector(parent));
500501
} else {
501-
parent = angular.element(options.parent);
502+
parent = angular.element(parent);
502503
}
503504

504-
505505
// If parent querySelector/getter function fails, or it's just null,
506506
// find a default.
507507
if (!(parent || {}).length) {

0 commit comments

Comments
 (0)