Title: JS console Uncaught SyntaxError
Last modified: December 13, 2018

---

# JS console Uncaught SyntaxError

 *  Resolved [tristanmason](https://wordpress.org/support/users/tristanmason/)
 * (@tristanmason)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/js-console-uncaught-syntaxerror/)
 * Hi, and thanks for this great plugin – it has been really useful for us.
 * I was looking at the console for another reason and just noticed a syntax error“**
   Uncaught SyntaxError: Unexpected token }**”
 * It appears to be coming from the **notify:** line below.
 *     ```
       <script type="text/javascript">
       var $buoop = {
       notify:{e:10,f:45,o:37,s:8,c:},
       reminder:0,
       test:false,
       newwindow:true,
       style:"",
       insecure:"",
       unsupported:"",
       mobile:"",
       api:5
       };
       ```
   
 * I fixed it on my site by moving the ‘,c:’ in line 26 in WP-BrowserUpdate.php 
   to be inside the !isset() statement so it only outputs that key if there is also
   a value. Is that an ok way to fix this?
 * OLD
    `$browser = 'e:'.$wpbu_vars[0].',f:'.$wpbu_vars[1].',o:'.$wpbu_vars[2].',
   s:'.$wpbu_vars[3].',c:'.(!isset($wpbu_vars[4])?'':$wpbu_vars[4]);`
 * NEW
    `$browser = 'e:'.$wpbu_vars[0].',f:'.$wpbu_vars[1].',o:'.$wpbu_vars[2].',
   s:'.$wpbu_vars[3].(!isset($wpbu_vars[4])?'':',c:'.$wpbu_vars[4]);`
 * ___
    (Edit: fix code tag backtick on wrong line)
    -  This topic was modified 7 years, 5 months ago by [tristanmason](https://wordpress.org/support/users/tristanmason/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [MacSteini](https://wordpress.org/support/users/macsteini/)
 * (@macsteini)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/js-console-uncaught-syntaxerror/#post-10992743)
 * Thanks for that. Will amend the code and publish the update soon.

Viewing 1 replies (of 1 total)

The topic ‘JS console Uncaught SyntaxError’ is closed to new replies.

 * ![](https://ps.w.org/wp-browser-update/assets/icon-256x256.png?rev=2383682)
 * [WP BrowserUpdate](https://wordpress.org/plugins/wp-browser-update/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-browser-update/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-browser-update/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-browser-update/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-browser-update/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [MacSteini](https://wordpress.org/support/users/macsteini/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/js-console-uncaught-syntaxerror/#post-10992743)
 * Status: resolved