Not able to load material file from OBJ Zip file

Hello ,
I am able to load model but not able to load materia on obj file with this code . where i am wrong?
My code is something like this -

function handleObjZIP(file, scene) {

var zip = new JSZip(file);

Object.keys(zip.files).forEach((object) => {

    var extension = object.split('.').pop().toLowerCase();

    if (extension === 'obj') {

        var objFile = zip.files[object]

    } else if (extension === 'mtl') {

        var mtlFile = zip.files[object]


const loadingManager = new THREE.LoadingManager();

loadingManager.setURLModifier(url => {

    const buffer = zip.files[url].asUint8Array();

    const blob = new Blob([buffer.buffer]);

    const NewUrl = URL.createObjectURL(blob);

    return NewUrl

 if (mtlFile !== undefined) {

        let materials = new MTLLoader(loadingManager).parse(mtlFile.asText());
        let object = new OBJLoader().setMaterials(materials).parse(objFile.asText());
    } else {
        var object = new OBJLoader().parse(objFile.asText());


Do you mind sharing your code as a GitHub repository so it’s possible to debug it?

Sorry … As per company policy I am not able to share.
If you find any error in above code please let me know…
Thank you

Maybe you can manage to reproduce the issue with a smaller test sample?