Click on Go Live button in the bottom right corner of WebIDE, to run the project.
Next, open "Web 8080" on the top of the VM and refresh it manually, click "test" and open the Console option in the browser console, you will see two error messages, they are TypeError: Cannot convert undefined or null to object and Uncaught TypeError: Cannot convert undefined or null to object.
In this step, you will learn how to fix the isObjectEqual function in the vue-router-2.7.0/src/util/route.js file to handle null values correctly.
Added a condition to check if a or b is null or undefined. If either is null or undefined, the function will return a === b.
This ensures that the function correctly handles null values in the query parameter.
Rebuild and Test the Project
In this step, you will rebuild and test the vue-router-2.7.0 project after fixing the isObjectEqual function.
In the terminal, navigate to the vue-router-2.7.0 directory.
Run the command npm install to install the dependencies. This process might take a while, please be patient. (If it gets stuck for a long time, please press Ctrl+C to terminate the process and then run this command again.)
After the installation is complete, run the command npm run build to rebuild and release the project. This will generate the updated vue-router-2.7.0 library with the fixed isObjectEqual function.
Go back to the web page and refresh the page.
Click on "test" and open the console in the Console tab to check, you will not see the above error message anymore.
If the error messages are gone, the fix is successful. You have completed the project!
We use cookies for a number of reasons, such as keeping the website reliable and secure, to improve your experience on our website and to see how you interact with it. By accepting, you agree to our use of such cookies. Privacy Policy