-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible global scope issue? #56
Comments
@nroose Yes, the default behavior is to include the Skim preamble at the top of each compiled template. The preamble defines
To avoid redefining the Skim preamble in each template, you can set the Skim::Engine.default_options[:use_asset] = true Then you can add the Skim preamble manually to any JS file in a Sprockets asset pipeline: //= require skim |
I guess it's easier if I post part of the error message:
Seems to me that the templates shouldn't call eachother, no? What's the rational for using global scope for these functions? |
I have one template inadvertently calling the Skim.withContext method of another template. It seems as though this should not happen, but it very definitely is. Any chance the call to Skim.withContext can be changed to be more specific? I have many templates and it's only happening with these two.
The text was updated successfully, but these errors were encountered: