[SOLVED] Cannot read properties of undefined (reading 'root')

Enternn.prototype.initialize = function() {
    var any = function(hmm){
        if(hmm == true){
        this.app.root.findByName("NN").enabled = false;}
    };

    this.app.on('welcometext:destroy', any);
var any = function(hmm) {
    if (hmm == true) {
        this.app.root.findByName("NN").enabled = false;
    }
}.bind(this));
2 Likes

thank you very much! work

1 Like