We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a59a66 commit a13ac78Copy full SHA for a13ac78
1 file changed
lib/app.rb
@@ -301,7 +301,7 @@ def supports_js_redirection?
301
get %r{\A/([\w~\.%]+)(\-[\w\-]+)?(/.*)?\z} do |doc, type, rest|
302
doc.sub! '%7E', '~'
303
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')
+ return redirect "/angularjs/api#{rest}", 301 if doc == 'angular' && rest && rest.start_with?('/ng')
305
return 404 unless @doc = find_doc(doc)
306
307
if rest.nil?
0 commit comments