Skip to content

Commit

Permalink
added some event handler null check
Browse files Browse the repository at this point in the history
SQUASHED: AUTO-COMMIT-src-client-morphic-events.js,AUTO-COMMIT-src-components-tools-lively-container-navbar.js,
  • Loading branch information
JensLincke committed Apr 16, 2024
1 parent c250245 commit 1c3a37f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/client/morphic/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ export default class Events {

HTMLElement.prototype.addEventListener = function(type, cb, ...rest) {
// we cannot just wrapp a callback cb, because callbacks are also used in removeEventListener...
if (!cb) {
console.warn("addEventListener: registering empty callback for " + type)
return
}
var func = cbMap.get(cb) || (function(...args) {

// this becomes dangerous... without COP, we need a global flag
Expand Down
1 change: 0 additions & 1 deletion src/components/tools/lively-container-navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,6 @@ export default class LivelyContainerNavbar extends Morph {
eaMethodInfo.class = classInfo.name // for later use
var name = eaMethodInfo.name
var methodItem = this.createDetailsItem(name)
debugger
if (eaMethodInfo.static) {
methodItem.insertBefore(<span class="mod">static</span>, methodItem.querySelector("a"))
}
Expand Down

0 comments on commit 1c3a37f

Please sign in to comment.