textureUnits is null error on iOS

Hello, could someone who’s more familiar with the engine point me in the right direction on what could lead to textureUnits being null. This is from an engine error I’m only seeing on iOS (as an Android user this is a pain to debug). I’m presuming there’s something I’m doing in a script that is leading to this error. I believe this error is relatively new. I just don’t know where I should be looking in my code, trying to figure out what would cause this.

The file+line the engine error is occuring at: https://github.com/playcanvas/engine/blob/d3040d14ddd0eab10cb097d7b235e44ff0950689/src/graphics/device.js#L2028
This is the function:

    // If the texture is not already bound on the currently active texture
    // unit, bind it
    bindTexture: function (texture) {
        var textureTarget = texture._glTarget;
        var textureObject = texture._glTexture;
        var textureUnit = this.textureUnit;
        var slot = this.targetToSlot[textureTarget];
        if (this.textureUnits[textureUnit][slot] !== textureObject) {
            this.gl.bindTexture(textureTarget, textureObject);
            this.textureUnits[textureUnit][slot] = textureObject;
        }
    },

Nope, never seen that before. Can you whip up a simple repro for this issue please (and ideally log it on the GH repo).