This pull request should resolve: https://github.com/openlayers/openlayers/issues/6521 Now with var and single quotes