Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Checking for undefined to fix JS errors in new / empty stores
Browse files Browse the repository at this point in the history
  • Loading branch information
ozten committed Jan 17, 2012
1 parent a9665c7 commit 17b91bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion www/repotheweb.org/config.html
Expand Up @@ -37,7 +37,7 @@
</script>
<script type="text/template">
<header><h1>{{= _("Protocol Handlers") }}</h1></header>
<ul>{{ each(data('protocolhandler-list'), function(scheme) { }}
<ul>{{ if (data('protocolhandler-list')) each(data('protocolhandler-list'), function(scheme) { }}
<li id="scheme-{{= scheme }}"><h3>{{= scheme }}</h3>
<input type="radio" name="default-{{= scheme }}" value="-1"
onclick="makeDefault('{{= scheme }}');"> {{= _('no default') }}
Expand Down
2 changes: 1 addition & 1 deletion www/repotheweb.org/index.html
Expand Up @@ -19,7 +19,7 @@ <h2>{{= url }}</h2>
<p><a href="/config.html" title="{{= _('config Tooltip') }}">{{= _('service') }}</a></p>
</header>
<ul>
{{ each(rphs, function() { }}
{{ console.log('rphs', rphs); if (rphs && rphs.length) each(rphs, function() { }}
<li><a href="{{= this.url.replace('%s', escape(url)) }}" title="{{= _('service tooltip', this.title) }}">
<strong>{{= this.title }}</strong> ({{= this.url }})</a></li>
{{ }); }}
Expand Down

0 comments on commit 17b91bf

Please sign in to comment.