Object Reference Error #114

Closed
pacificobob opened this Issue Nov 11, 2013 · 1 comment

Projects

None yet

2 participants

@pacificobob

I run into the following error when passing object values using dot notation:

[ERROR] missing name after . operator

This error occurs when I pass values to the function as follows:

myFunction(explanations.slide1.short, explanations.slide1.long);

It is possible to work around this error by passing arguments like this:

myFunction(explanations["slide1"]["short"], explanations["slide1"]["long"]);

I am not sure if it is the object references themselves that are causing the issue, or if it is due to the fact that they are being passed to functions; however, it would be nice to have both options available when referencing object values.

@tml
Collaborator
tml commented Nov 11, 2013

This is a known issue - both "short" and "long" are reserved words in Javascript prior to ES5 (which YUICompressor does not yet support). See #41, #47, #77, #83, #98.

@tml tml closed this Nov 11, 2013
@tml tml added the es5 label Dec 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment