assertion to check that there's a DOM node for target element
This commit is contained in:
@@ -1064,7 +1064,12 @@ ol.Map.prototype.handleTargetChanged_ = function() {
|
|||||||
// If it's not now an Element we remove the viewport from the DOM.
|
// If it's not now an Element we remove the viewport from the DOM.
|
||||||
// If it's an Element we append the viewport element to it.
|
// If it's an Element we append the viewport element to it.
|
||||||
|
|
||||||
var targetElement = this.getTargetElement();
|
var targetElement;
|
||||||
|
if (this.getTarget()) {
|
||||||
|
targetElement = this.getTargetElement();
|
||||||
|
goog.asserts.assert(targetElement !== null,
|
||||||
|
'expects a non-null value for targetElement');
|
||||||
|
}
|
||||||
|
|
||||||
if (this.keyHandlerKeys_) {
|
if (this.keyHandlerKeys_) {
|
||||||
for (var i = 0, ii = this.keyHandlerKeys_.length; i < ii; ++i) {
|
for (var i = 0, ii = this.keyHandlerKeys_.length; i < ii; ++i) {
|
||||||
|
|||||||
Reference in New Issue
Block a user