Open Ankiewicz opened 8 years ago
personal-snippets, vundefined
@Ankiewicz I wonder if this might have anything to do with it?
Thank you, I deleted the folder from packages and it works without throwing an error. This was my attempting to load the snippets without your package.
THANK YOU!!
@Ankiewicz So that was the cause or not? This package loads your snippets from ATOM_HOME/snippets
so just move them into there…
Yes it appears to have been.
Okay, as soon as I said yes, it showed up again, of course
Not sure if these help at all. Please let me know if there is anything else I can do to help resolve the bug.
Could it be two different packages conflicting?
Okay, as soon as I said yes, it showed up again, of course
Always the way… 😄
@Ankiewicz Just looking at this… Iv’e actually refactored the code a bit since the last update on my local copy so will push an update that should/might correct this (it makes heavier use of the ?
existential operator…)
Could it be two different packages conflicting?
I don’t think so, but do you still have that personal-snippets package running?
The error is thrown from this line so it’s not picking up @project
(which is just atom.project.getPaths()[0]
), not sure why… Is it actually loading your snippets from ATOM_HOME/snippets
and/or you local project snippets?
I don’t think so, but do you still have that personal-snippets package running? No I deleted the folder. I am still using the snippets, but that attempt of creating my own package, I dropped it.
I created a folder "snippets" in the atom file and it's working from there.(attached image of folder structure)
also, wanted to note it only occurs when I save the file.
Same problem here, these are the steps I followed to reproduce the bug:
After the step number 4 the error shows up. It seems that path is undefined for files created using Application: New File and it produces that startsWith
can be reached because path
is undefined. A simple workaround could be check if path exists before execute that part of the code.
This is the best config. https://gist.github.com/radiovisual/7c27e5a1d0f7aa56e0e3922c98e19ffc
[Enter steps to reproduce below:]
Atom Version: 1.8.0 System: Mac OS X 10.10.5 Thrown From: modular-snippets package, v0.1.2
Stack Trace
Uncaught TypeError: Cannot read property 'startsWith' of undefined
Commands
Config
Installed Packages