Error thrown in doMouseUp


We are getting quite a few automated reports of an error being thrown in GoJS (1.6.11). I’ve not been able to reproduce it but wondered if you’d seen anything similar that may give me a clue as to what’s going on?

The stack trace looks like this

TypeError: Cannot read property ‘ud’ of null at brt ( at fkt ( at pp ( at at.doMouseUp ( at i.doMouseUp ( at (

We don’t hook into the mouseUp event so I assume this is all internal to GoJS

The code for the brt function looks like this

function brt(n, i, r, u) {
var f, e, o;
if (null === n.ud && (n.ud = new oa), || !== r || n.ud.eA !== u) {
if (null === r)
for (i = n.lj ? dct(n) : n.Vd.copy(),
i.Nf(100, 100),
i = t.Yf(),
f = n.xg;; )
e = f.value,
o = e.layer,
null !== o && o.visible && !o.Fc && krt(n, e, u, i);
for (r.W.J() || r.of(),
i = r.W.copy(),
i.Nf(20, 20),
i = t.Yf(),
f = r.Hc;; )
e = f.value,
e instanceof c && krt(n, e, u, i);
t.fc(i); = r;
n.ud.eA = u; = !1
} else
i && ng(n.ud);
return n.ud

So I assume n is null when the function is called. If you could give me an idea of what this function does then I may be able to figure out if we are doing something incorrectly

That’s an internal function used by Links with AvoidsNodes routing to determine where not to cross. Apparently you have re-minified the go.js library, because our library has no minified names of three-characters.

It appears that your minifier has rewritten the method to be a static function (which is plausible) where the first argument is a Diagram.

OK, thanks, I’ll have a closer look at our links implementation. I’ll also stop including GoJS in our Javascript bundling to eliminate that as an issue.