Both values are equal but for some reason they aren't

The important part is in the start and end of the scripts.

Customer script

let customer1 ={
    moodMeter: 100,
    img: "img/customer1.png",
    request: null,
}

let customer2 ={
    moodMeter: 100,
    img: "img/customer2.png",
    request: null,
}

let customer3={
    moodMeter: 100,
    img: "img/customer2.png",
    request: null,
}

let requests = [
    { name: "Dog", imgSrc: "img/dog.png" },
    { name: "Cat", imgSrc: "img/cat.png" },
    { name: "Bunny", imgSrc: "img/bunny.png" },
    { name: "Monkey", imgSrc: "img/monkey.png" },
    //{ name: "dogFood", imgSrc: "img/dog.png" },
    //{ name: "catFood", imgSrc: "img/dog.png" },
    //{ name: "bunnyFood", imgSrc: "img/dog.png" },
    //{ name: "monkeyFood", imgSrc: "img/dog.png" }
];



function SetCustomers(){
    if (localStorage.getItem('customer1')){
        customer1Spawner();
    }
    if (localStorage.getItem('customer2')){
        customer2Spawner();
    }
    if (localStorage.getItem('customer3')){
        customer3Spawner();
    }
}


function getRandomRequest(customerNumber) {
    let storedCustomer = JSON.parse(localStorage.getItem("customer" + customerNumber));

    let customerRequestIcon = document.getElementById("customer" + customerNumber + "RequestIcon");
    
    
    const randomIndex = Math.floor(Math.random() * requests.length);
  
    let a = requests[randomIndex];
    
    
    if (storedCustomer.request === null) {
        storedCustomer.request = a;

        localStorage.setItem('customer' + customerNumber, JSON.stringify(storedCustomer));
        customerRequestIcon.setAttribute("src", storedCustomer.request.imgSrc);
    }else{
        customerRequestIcon.setAttribute("src", storedCustomer.request.imgSrc);
    }
}

function updateCustomerMood(customerNumber) {
    let timeLapsedMood = localStorage.getItem("moodDecrease");

    if (!localStorage.getItem('customer' + customerNumber)) {
        return;
    }

    let storedCustomer = JSON.parse(localStorage.getItem("customer" + customerNumber));

    storedCustomer.moodMeter -= timeLapsedMood;
    localStorage.setItem("moodDecrease", "0");

    storedCustomer.moodMeter -= 1;

    let moodIcon = document.getElementById("customer" + customerNumber + "MoodIcon");

    if (storedCustomer.moodMeter <= 100 && storedCustomer.moodMeter > 75) {
        moodIcon.setAttribute("src", "img/veryHappy.png");
    } else if (storedCustomer.moodMeter <= 75 && storedCustomer.moodMeter > 50) {
        moodIcon.setAttribute("src", "img/happy.png");
    } else if (storedCustomer.moodMeter <= 50 && storedCustomer.moodMeter > 25) {
        moodIcon.setAttribute("src", "img/angry.png");
    } else if (storedCustomer.moodMeter <= 25 && storedCustomer.moodMeter > 0) {
        moodIcon.setAttribute("src", "img/veryAngry.png");
    } else if (storedCustomer.moodMeter <= 0) {
        localStorage.removeItem('customer' + customerNumber);
        let customerDiv = document.getElementById("customer" + customerNumber);
        customerDiv.parentNode.removeChild(customerDiv);
        return;
    }

    localStorage.setItem('customer' + customerNumber, JSON.stringify(storedCustomer));
}



function spawnCustomer(customerNumber, storedCustomer) {
    if (!document.getElementById("customer" + customerNumber)){
        let customerLineDiv = document.getElementById("customersLine");

        if(!customerLineDiv){
            return;
        }

        let customerDiv = document.createElement("div");
        customerDiv.setAttribute("id", "customer" + customerNumber);

        let customerImg = document.createElement("img");
        customerImg.setAttribute("id", "customer" + customerNumber + "Img");
        customerImg.setAttribute("src", storedCustomer.img);

        let customerMoodIconDiv = document.createElement("div");
        customerMoodIconDiv.setAttribute("id", "customer" + customerNumber + "MoodIconDiv");

        let customerMoodIcon = document.createElement("img");
        customerMoodIcon.setAttribute("id", "customer" + customerNumber + "MoodIcon");


        let customerRequestDiv = document.createElement("div");
        customerRequestDiv.setAttribute("id", "customer" + customerNumber + "RequestDiv");

        let customerRequestIcon = document.createElement("img");
        customerRequestIcon.setAttribute("id", "customer" + customerNumber + "RequestIcon");
        customerRequestIcon.setAttribute("onclick", "ReceiveRequest();")


        customerMoodIconDiv.appendChild(customerMoodIcon);
        customerRequestDiv.appendChild(customerRequestIcon);
        customerDiv.appendChild(customerMoodIconDiv);
        customerDiv.appendChild(customerImg);
        customerDiv.appendChild(customerRequestDiv);
        customerLineDiv.appendChild(customerDiv);

        getRandomRequest(customerNumber);
        


        setInterval(() => {
            updateCustomerMood(customerNumber);
        }, 1000);

    }
   
}


function customer1Spawner() {
    if (!localStorage.getItem("customer1")){
        localStorage.setItem("customer1", JSON.stringify(customer1));
    }
        spawnCustomer(1, customer1);
    
}

function customer2Spawner() {
    if (!localStorage.getItem("customer2")){
        localStorage.setItem("customer2", JSON.stringify(customer2));
    }
    spawnCustomer(2, customer2);

}

function customer3Spawner() {
    if (!localStorage.getItem("customer3")){
        localStorage.setItem("customer3", JSON.stringify(customer3));
    }
    spawnCustomer(3, customer3);
}



function WhenToSpawn(){
    let hours = parseInt(localStorage.getItem("hours"));
    let minutes = parseInt(localStorage.getItem("minutes"));


    if (hours === 7 && minutes === 2){
        customer1Spawner()
    }
    if(hours === 7 && minutes === 5) {
        customer2Spawner()
    }
    if(hours === 8 && minutes === 0) {
        customer3Spawner()
    }
    if(hours === 8 && minutes === 40) {
        customer1Spawner()
    }
    if(hours === 9 && minutes === 0) {
        customer2Spawner()
    }
    if(hours === 9 && minutes === 40) {
        customer3Spawner()
    }
    if(hours === 10 && minutes === 0) {
        customer1Spawner()
    }
    if(hours === 10 && minutes === 40) {
        customer2Spawner()
    }
    if(hours === 11 && minutes === 0) {
        customer3Spawner()
    }
    if(hours === 11 && minutes === 40) {
        customer1Spawner()
    }
    if(hours === 12 && minutes === 0) {
        customer2Spawner()
    }
    if(hours === 12 && minutes === 40) {
        customer3Spawner()
    }
    if(hours === 13 && minutes === 0) {
        customer1Spawner()
    }
    if(hours === 13 && minutes === 40) {
        customer2Spawner()
    }
    if(hours === 14 && minutes === 0) {
        customer3Spawner()
    }
    if(hours === 14 && minutes === 40) {
        customer1Spawner()
    }
    if(hours === 15 && minutes === 0) {
        customer2Spawner()
    }
    if(hours === 15 && minutes === 40) {
        customer3Spawner()
    }
    if(hours === 16 && minutes === 0) {
        customer1Spawner()
    }
    if(hours === 16 && minutes === 40) {
        customer2Spawner()
    }
    if(hours === 17 && minutes === 0) {
        customer3Spawner()
    }
    if(hours === 17 && minutes === 40) {
        customer1Spawner()
    }

}

setInterval(WhenToSpawn, 1000);


function ReceiveRequest() {
    let inventorySlot = document.getElementById("slot1");
    let storedInventory = JSON.parse(localStorage.getItem("inventory"));
    let customer1 = JSON.parse(localStorage.getItem("customer1"));

    
    console.log("inventorySlot.objectName:", storedInventory.objectName);
    console.log("customer1.request.name:", customer1.request.name);

    if (inventorySlot.objectName === customer1.request.name) {
        console.log("Items matched!");

        inventorySlot.removeChild(inventorySlot.firstElementChild);
        storedInventory.objectName = null;
        storedInventory.img = null;
        storedInventory.capacity = 1;
        localStorage.setItem("inventory", JSON.stringify(storedInventory));
    } else {
        console.log("Items didn't match."); 
    }
}

petScript

let Dog = {
    value: 50,
    happiness: 100,
    hungry: 100,
    img: "img/Dog.png",
}

let Cat = {
    value: 50,
    happiness: 100,
    hungry: 100,
    img: "img/Cat.png",
}

let Bunny = {
    value: 50,
    happiness: 100,
    hungry: 100,
    img: "img/Bunny.png",
}


let Monkey = {
    value: 50,
    happiness: 100,
    hungry: 100,
    img: "img/monkey.png",
}



function createPet(name, storedPet, petSlot){
    
    let petSlots = document.getElementById("AnimalZone" + petSlot);
        
    let petImg = document.createElement("img");
    petImg.setAttribute("id", name);
    petImg.setAttribute("src", storedPet.img);
    petImg.setAttribute("onclick", "MovePetToInventory('" + name + "');");

    petSlots.appendChild(petImg);
}


function spawnCat(){
    let catImg = document.getElementById("Cat");
    let inventory = JSON.parse(localStorage.getItem("inventory"));
    if (!localStorage.getItem("Cat")){
        localStorage.setItem("Cat", JSON.stringify(Cat));
    }
    if (!catImg && inventory.objectName !== "Cat") {
        createPet("Cat", Cat, 1);
    }
}



function spawnBunny(){
    let bunnyImg = document.getElementById("Bunny");
    let inventory = JSON.parse(localStorage.getItem("inventory"));
    if (!localStorage.getItem("Bunny")){
        localStorage.setItem("Bunny", JSON.stringify(Bunny));
    }
    
    if (!bunnyImg && inventory.objectName !== "Bunny") {
        createPet("Bunny", Bunny, 2);
    }
}

function spawnDog(){
    let DogImg = document.getElementById("Dog");
    let inventory = JSON.parse(localStorage.getItem("inventory"));
    if (!localStorage.getItem("Dog")){
        localStorage.setItem("Dog", JSON.stringify(Dog));
    }
    if (!DogImg && inventory.objectName !== "Dog") {
        createPet("Dog", Dog, 3);
    }
}

function spawnMonkey(){
    let monkeyImg = document.getElementById("Monkey");
    let inventory = JSON.parse(localStorage.getItem("inventory"));
    if (!localStorage.getItem("Monkey")){
        localStorage.setItem("Monkey", JSON.stringify(Monkey));
    }
    if (!monkeyImg && inventory.objectName !== "Monkey") {
        createPet("Monkey", Monkey, 4);
    }
}

function setPets(){
    
    setInterval(spawnCat, 0);
    setInterval(spawnDog, 0);
    setInterval(spawnMonkey, 0);
    setInterval(spawnBunny, 0);
    
}


function MovePetToInventory(name, petSlot) {
    
    let inventory = JSON.parse(localStorage.getItem("inventory"));
    let petSlots = document.getElementById("AnimalZone" + petSlot);
    let petImg = document.getElementById(name);
    let inventorySlot = document.getElementById("slot1");
    
    
    if (inventory.capacity === 1){
        petImg.setAttribute("onclick", "RemoveObject();");
        inventory.capacity = 0;
        inventory.img = petImg.src;
        inventory.objectName = name;
        inventorySlot.appendChild(petImg);
        localStorage.setItem("inventory", JSON.stringify(inventory));
        console.log(inventory.objectName);
    }
}

inventory script

let inventory = {
    capacity: 1,
    img: null,
    objectName: null,
}


function SetInventory(){
    if (!localStorage.getItem("inventory")){
        localStorage.setItem("inventory", JSON.stringify(inventory));
    }
    let storedInventory = JSON.parse(localStorage.getItem("inventory"));
    
    let inventorySlot = document.getElementById("slot1");
    let img = document.createElement("img");
    img.setAttribute("onclick", "RemoveObject();");
    
    if (storedInventory.img !== null) {
        img.setAttribute("src", storedInventory.img);
        inventorySlot.appendChild(img);
    }
}


function RemoveObject(){
    let inventorySlot = document.getElementById("slot1");
    inventorySlot.removeChild(inventorySlot.firstElementChild);
    localStorage.setItem("inventory", JSON.stringify(inventory));
}

Output

can you explain what issue you are having? what is the expected behaviour? what is happening instead?

in the customer script in the final of the code theres a function called ReceiveRequest and in the if statement Im comparing :
inventorySlot.objectName === customer1.request.name

and in the console in the image it shows both their values to check if their are equal to each other, but as shown in the console both are equal.
saying that it should show “items matched”

can you add more details? how do I reproduce this?