Error occurs when storing an array in Vuex state in Internet Explorer and Microsoft Edge browsers

When initially establishing an array within the vuex store like this:

const state = {
  tags: [1, 2, 3]
}

Unexpectedly, both Internet Explorer 11 and Microsoft Edge are rendering a blank page along with this error message:

Error: “Unknown name” error in vue.esm.js

This issue doesn't occur on Chrome, Firefox, Safari, or Opera.

However, the problem disappears when the values are removed:

const state = {
  tags: []
}

I have babel-polyfill integrated (main.js: import 'babel-polyfill'). Here's my package.json configuration:

  "dependencies": {
    "@xkeshi/image-compressor": "^0.5.2",
    "axios": "^0.17.1",
    "bulma": "^0.6.1",
    ...
  },
  "devDependencies": {
    "autoprefixer": "^7.2.3",
    "babel-core": "^6.26.0",
    ...
  },

The same error arises when applying vuex-persistedstate.

Answer №1

The issue has been identified - I take full responsibility for this error - there was a syntax mistake in the key of my v-for loop...

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Utilize the power of EasyAutocomplete in jQuery to easily filter JSON

I have a functioning code, but I need help filtering JSON data to display labels of corresponding IDs greater than or equal to 3. In this scenario, only "India" and "France" should appear in the suggestion list. It's important to note that I am usin ...

What is the best way to securely store the OAuth access_token to be used at a later time?

My current challenge involves getting and storing an access token from the Pocket API using Node.js. I have successfully obtained the request token, redirected to the Pocket login page, returned to my site, and exchanged the request token for an access tok ...

What is the best way to dismiss the additional modal popup?

Here is an example that I need help with: http://jsfiddle.net/zidski/Mz9QU/1/ When clicking on Link2 followed by Link1, I would like the Link2 box to close automatically. Is there anyone who can assist me with this issue? ...

What is the best way to create a loop within a JavaScript function?

I'm having some trouble with looping inside a function. It seems like my looping is not working properly and I need help fixing it, along with suggestions for the problem. :) Here's what I've tried: <script> function getImage1( ...

Is there a way to turn off the cache following an error response from useFetch in Nuxt version 3.8?

When I use the useFetch function and receive a 404 or 500 error, switching pages and then returning to the original page causes useFetch to not make another request and instead display the same information. However, if I refresh the page, useFetch works as ...

"Customize the centering offset of Google Maps based on the width of

Struggling to implement a design using my code, but it's not behaving as expected. When the old width is larger than the new width, the offset Center should be -50. And when the old width is smaller, the offset Center should be 50. The offset Center ...

Comparing Ember.js yield with Sails.js and Handlebars in a Single Page Application (SPA) approach

I am looking to achieve a specific functionality that is typically done in Ember with Handlebars, but I want to accomplish it using only Sails.js and Handlebars. To set up my Sails project, I used the following command: sails new fooProject --template=han ...

Tips for inserting a footer at the bottom of every page during the conversion process from HTML to PDF

Could use some assistance with converting HTML into a PDF report. In particular, I want the footer to always appear at the bottom of the last page, even if there is minimal content on that page. Any suggestions? I've been utilizing the wkhtmltopdf to ...

Asynchronous JavaScript function within a loop fails to refresh the document object model (DOM) despite

I have been working on a function that utilizes ajax to retrieve instructions from a backend server while the page is loading. The ajax code I've written retrieves the instructions based on the number provided and displays them using the response.setT ...

Obtain the selected value from a dropdown menu located within the parent div using JQuery

I am currently facing an issue with my HTML form. I need to retrieve the values of the .plotNumber select and the sub_category field. Note: Users can add new rows to the form, resulting in multiple instances of <div class="standard-row add-admin-row in ...

How can you use the syntax to refer to two separate arrays in a for loop by using a third array

Apologies if my question is unclear, allow me to clarify: I have two arrays in 2D format: const letterA = [ [...],[...],...]; const letterB = [ [...],[...],...]; const letterArray["A","B"]; I want to access them using a for loop like so: let i = 0; for ...

Button Type Comparison: Click Event vs Submit Event

Having trouble getting a simple submit button to trigger the click and submit event... html <input type="submit" id="test"> JQuery: $(document).ready(function(){ $('#test').onclick(function(){ alert('Hi') }) $ ...

Initiate an Ajax call to pre-fetch video content

I've been attempting to download a video from my own source and display a loading message while it's being downloaded. Once the download is complete, I want to hide the loading icon and have the video ready for playback. My issue lies in gettin ...

Exploring the Seamless Integration of Vuex State with VueRouter in a Nuxt Environment

Hi there, I'm currently trying to access the vuex state from my VueRouter instance but I'm facing some difficulties. When attempting to access the $store property of router.app, it seems to be returning null. This is the code snippet for my Vue ...

Jquery Droppable issue arising with dynamically added DIVs

I am facing a similar issue as described in this question and this one I am trying to implement drag-and-drop and resize functionality. It is working fine for static elements, but I encounter issues when adding dynamic divs. The resize property works prop ...

Incorporating Functions from an External Script in ReactJS/GatsbyJS

One of the functionalities on my website involves dynamically inserting a script into the head when a form element is focused, enabling it to load faster. This process is achieved using basic vanilla JS rather than React Helmet, as shown below: const handl ...

Splitting Angular modules into separate projects with identical configurations

My Angular project currently consists of approximately 20 different modules. Whenever there is a code change in one module, the entire project needs to be deployed. I am considering breaking down my modules into separate projects for individual deployment. ...

Infinite loop issue in Javascript regex when detecting uppercase characters

I've recently developed a regular expression in node.js to identify text fragments resembling URLs. However, I encountered an issue where my regexp gets stuck in an endless loop when processing certain texts! Here is the complete regular expression: ...

Converting a jQuery DOM element into a string representation

Currently, I am working with a textarea that contains the contents of an HTML file. This textarea includes all elements of my HTML page such as doctype, head, html, etc. My goal is to save the content of the textarea into a DOM variable using $.parseHTML: ...

Using JS and HTML to rotate images in a gallery using an array

This script is designed to work when a button is clicked, but there is an issue with it using hidden images instead of images stored in an array. Could you provide guidance on how to modify it so that the images are stored in an array? <!doctype html ...