Skip to content

Commit a13ac78

Browse files
committed
Fix server error
1 parent 8a59a66 commit a13ac78

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/app.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def supports_js_redirection?
301301
get %r{\A/([\w~\.%]+)(\-[\w\-]+)?(/.*)?\z} do |doc, type, rest|
302302
doc.sub! '%7E', '~'
303303
return redirect "/#{DOC_REDIRECTS[doc]}#{type}#{rest}", 301 if DOC_REDIRECTS.key?(doc)
304-
return redirect "/angularjs/api#{rest}", 301 if doc == 'angular' && rest.start_with?('/ng')
304+
return redirect "/angularjs/api#{rest}", 301 if doc == 'angular' && rest && rest.start_with?('/ng')
305305
return 404 unless @doc = find_doc(doc)
306306

307307
if rest.nil?

0 commit comments

Comments
 (0)