cocos2d-js 3.14.1 在使用cc.director.convertToGL(touch.getLocation());报错

cocos2d-js 3.14.1 在使用cc.director.convertToGL(touch.getLocation());报错
Uncaught ReferenceError: element is not defined

/**
* Converts a view coordinate to an WebGL coordinate

* Useful to convert (multi) touches coordinates to the current layout (portrait or landscape)

* Implementation can be found in CCDirectorWebGL
* @function
* @param {cc.Point} uiPoint
* @return {cc.Point}
*/
convertToGL: function (uiPoint) {
var docElem = document.documentElement;
var view = cc.view;
var box = element.getBoundingClientRect();
box.left += window.pageXOffset - docElem.clientLeft;
box.top += window.pageYOffset - docElem.clientTop;
var x = view._devicePixelRatio * (uiPoint.x - box.left);
var y = view._devicePixelRatio * (box.top + box.height - uiPoint.y);
return view._isRotated ? {x: view._viewPortRect.width - y, y: x} : {x: x, y: y};
},
这个 方法 是有BUG 吗? 还是 我没用对?
那个 **

element

** 在那里 确实没有 定义啊 !