fix the cicular reference

master
JFH 2020-08-03 17:39:05 +02:00
parent 4f882a947a
commit ebffaa4bf0
2 changed files with 2 additions and 4 deletions

View File

@ -21,7 +21,6 @@
import {NS} from './namespaces.js';
import {getTransformList} from './svgtransformlist.js';
import {isNullish} from './utilities.js';
// Constants
const NEAR_ZERO = 1e-14;
@ -152,7 +151,7 @@ export const transformBox = function (l, t, w, h, m) {
* @returns {SVGTransform} A single matrix transform object
*/
export const transformListToTransform = function (tlist, min, max) {
if (isNullish(tlist)) {
if (!tlist) {
// Or should tlist = null have been prevented before this?
return svg.createSVGTransformFromMatrix(svg.createSVGMatrix());
}

View File

@ -7,7 +7,6 @@
*/
import {NS} from './namespaces.js';
import {isNullish} from './utilities.js';
const wAttrs = ['x', 'x1', 'cx', 'rx', 'width'];
const hAttrs = ['y', 'y1', 'cy', 'ry', 'height'];
@ -306,7 +305,7 @@ export const isValidUnit = function (attr, val, selectedElement) {
// not already present
try {
const elem = elementContainer_.getElement(val);
result = (isNullish(elem) || elem === selectedElement);
result = (!elem || elem === selectedElement);
} catch (e) {}
return result;
}