Namespace in included file is not available
-
I have some constants declared in a namespace, which are in a file that gets included at the top of my script.
For some reason these constants are not available in one particular function.
If I declare these constants in the exact same place, but without the namespace, they are available and it works fine.
I'll investigate more later!
-
@Simon Could you give a script example?
-
@d-healey Of course, later, was just putting it here so I remember to come back and investigate :)
-
@Simon Sure, does everything else in that namespace work as expected?
-
-
@Simon were you including the namespace within another namespace?
-
@d-healey Nope, it's the only namespace in the project and it was just to have some nice prefixes on the constants. It feels like something with variable hoisting but I'll check properly later.