Wrong number of args for safeJS: want 1 got 0 [solved]

Sorry, solved it, the only reason was the capital in the variable name in the Front Matter of the markdown content file!

Hi,

Can you please advise on the following?:

I get the error “Wrong number of args for safeJS: want 1 got 0” from the Hugo server and don’t know why or how to solve it…

This is my markdown content:

+++
date = "2016-03-15T20:16:09+01:00"
title = "AlleCijfers.nl - Basisscholen in Aadorp"
description = "AlleCijfers.nl - Basisscholen in Aadorp"
plaats = "Aadorp"
aantal = "1"
school = "['Chr De Rank', 5, 0, 4, 0, 1, 0, 1] ]);"
gemeenteNaam = "Almelo"
gemeenteAantal = "3"
provincie = "Overijssel"
woonplaatsen = "Aadorp, Almelo, Bornerbroek"
tekstEen = "Aadorp is een woonplaats in de gemeente Almelo, provincie Overijssel."
aantalLeerlingen = "['2000', 6225], ['2001', 6502], ['2002', 6682], ['2003', 6607], ['2004', 6684], ['2005', 6720], ['2006', 6727], ['2007', 6832], ['2008', 6880], ['2009', 6921], ['2010', 6892], ['2011', 6786], ['2012', 6720], ['2013', 6553], ['2014', 6441]"
+++

And there are 2 parts that I want to use in 2 places of Javascripts in the same template .

I correctly get [‘Chr De Rank’, 5, 0, 4, 0, 1, 0, 1] ]); by using {{ .Params.school | safeJS }}

Likewise I try to get [‘2000’, 6225], [‘2001’, 6502], [‘2002’, 6682], [‘2003’, 6607], [‘2004’, 6684], [‘2005’, 6720], [‘2006’, 6727], [‘2007’, 6832], [‘2008’, 6880], [‘2009’, 6921], [‘2010’, 6892], [‘2011’, 6786], [‘2012’, 6720], [‘2013’, 6553], [‘2014’, 6441] by calling** {{ .Params.aantalLeerlingen | safeJS }}** a bit later on the page.

But this does not work. The page works fine with a manual insert of the code.

I.e. manual:

function TekenBasisSchoolLeerlingen()

{
    // Create the data table.
    var data = new google.visualization.DataTable();
    data.addColumn('string', 'Basisscholieren');
    data.addColumn('number', 'Aantallen');
    data.addRows([
  ['2000', 6225], ['2001', 6502], ['2002', 6682], ['2003', 6607], ['2004', 6684], ['2005', 6720], ['2006', 6727], ['2007', 6832], ['2008', 6880], ['2009', 6921], ['2010', 6892], ['2011', 6786], ['2012', 6720], ['2013', 6553], ['2014', 6441]
      ]);

Vs

function TekenBasisSchoolLeerlingen()

    {
        // Create the data table.
        var data = new google.visualization.DataTable();
        data.addColumn('string', 'Basisscholieren');
        data.addColumn('number', 'Aantallen');
        data.addRows([
      **    {{ .Params.aantalLeerlingen | safeJS }}**
          ]);

The HTML output just stops at

var data = new google.visualization.DataTable();
        data.addColumn('string', 'Basisscholieren');
        data.addColumn('number', 'Aantallen');
        data.addRows([

In stead of

var data = new google.visualization.DataTable();
        data.addColumn('string', 'Basisscholieren');
        data.addColumn('number', 'Aantallen');
        data.addRows([
          ['2000', 6225], ['2001', 6502], ['2002', 6682], ['2003', 6607], ['2004', 6684], ['2005', 6720], ['2006', 6727], ['2007', 6832], ['2008', 6880], ['2009', 6921], ['2010', 6892], ['2011', 6786], ['2012', 6720], ['2013', 6553], ['2014', 6441]
          ]);

Can you please advise how I can solve this?

Many thanks in advance! Kind regards, Wouter

PS I already searched and tried a lot, e.g. remove the first piece of JavaScript in order to have only 1 does not solve it. Also reducing the number elements to 5 does not help. Nor does using a partial script, adding separate tags etc…