Voyager: Uncaught SyntaxError: Invalid shorthand property initializer.

Created on 14 Aug 2017  路  8Comments  路  Source: the-control-group/voyager

  • Laravel Version: 5.4.32
  • Voyager Version: 0.11.42
  • PHP Version: 5.6
  • Database Driver & Version:

Description:

Fresh install of Laravel and Voyager. Chrome Browser Console shows several errors.

Uncaught SyntaxError: Invalid shorthand property initializer.
Example traced to script.

chrome.runtime.sendMessage({href: event.target.href, listener = "bthsmw"});

Steps To Reproduce:

Install Laravel, and Voyager as documentation indicates. Log into admin and view console.

Most helpful comment

I enabled the rest of my extensions besides Better History, looks like it's fixed. I sent an email to the extension creators. Can probably close this issue.

All 8 comments

Hey @fuzzyjared I'm seeing this same error happen on every site I visit. I think it's coming from a chrome extension, but I haven't been able to figure out which one yet. For now I've disabled all extensions, and I'll see if it reappears and reenable extensions one by one. If you have any ideas please let me know.

This was this only thing I could find on the web with either of the ID's in the snippet.

I had not thought of that. I am doing the same thing. I have not been able to create a consistently reproduction of the console error. Other than.

I am only seeing it on the voyager install.

I have been able to most often trigger it after enabling the extension ( Better History ). Not sure if you have the same extension though. I am working my way up the extensions as I review the features. Assuming that Web Developer Extension is always turned on.

I will update with any findings or lack there of.

I am using Better History, it's currently disabled, along with a whole bunch of others and I haven't seen the error. I'll enable all the others and see if that's it.

I enabled the rest of my extensions besides Better History, looks like it's fixed. I sent an email to the extension creators. Can probably close this issue.

Per your suggestion I will be closing this issue as it does appear to be a conflict with a chrome extension. Not sure why it appears to conflict only with this application but would need to be fixed on the extension side.

To fix any problems with Better History Chrome Extension

  1. Go to chrome://extensions/ in the browser
  2. Check mark Developer Mode

screen shot 2017-08-22 at 6 05 17 pm

  1. Click Update extensions now
    screen shot 2017-08-22 at 6 06 07 pm

I am not sure If your problem is resolved, just commenting for users who visit this in future.

As your error states "Invalid shorthand property initializer", There is wrong syntax in intialzing some variable

Looking more details of your error, looks like this line
chrome.runtime.sendMessage({href: event.target.href, listener = "bthsmw"});

should be (':' instead of "=" sign)
chrome.runtime.sendMessage({href: event.target.href, listener : "bthsmw"});

Found similar question here, with similar answer.
https://qawithexperts.com/questions/125/syntaxerror-invalid-shorthand-property-initializer

Hope it helps, thanks

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zzpwestlife picture zzpwestlife  路  3Comments

popica80 picture popica80  路  3Comments

rayqiri picture rayqiri  路  3Comments

IvanBohonosiuk picture IvanBohonosiuk  路  4Comments

ferrywae picture ferrywae  路  4Comments