Skip to content

Instantly share code, notes, and snippets.

@jakelear
Created September 19, 2014 16:14
Show Gist options
  • Save jakelear/3a83d966434a7ac7853c to your computer and use it in GitHub Desktop.
Save jakelear/3a83d966434a7ac7853c to your computer and use it in GitHub Desktop.
diff --git a/app/views/shared/campaigns/reskin/_reskin.html.erb b/app/views/shared/campaigns/reskin/_reskin.html.erb
index dd50b25..e21998e 100644
--- a/app/views/shared/campaigns/reskin/_reskin.html.erb
+++ b/app/views/shared/campaigns/reskin/_reskin.html.erb
@@ -80,8 +80,8 @@
<script type="text/javascript">
SBN.Campaigns.Components.addComponentCandidate({
type: "clientReskin",
- style: "<%= raw escape_javascript(reskin_styles.html_safe) %>",
- js: "<%= raw escape_javascript(reskin_js.html_safe) %>",
+ style: "<%= raw escape_javascript(reskin_styles.html_safe) if reskin_styles.present? %>",
+ js: "<%= raw escape_javascript(reskin_js.html_safe) if reskin_js.present? %>",
component: {
componentId: "<%= reskin.id %>",
trackerId: "<%= reskin.tracker_id(local_assigns[:tracker] || 'primary') %>",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment