Fix some issues causing Navigation functions to fail.

Conflicts:
	builds/4chan-X.user.js
	builds/crx/script.js
	src/General/Main.coffee
This commit is contained in:
Zixaphir 2014-03-03 00:03:55 -07:00 committed by ccd0
parent 298bed6336
commit 65671b2e2a
2 changed files with 4 additions and 5 deletions

View File

@ -274,6 +274,7 @@ Index =
return return
Navigate.title() Navigate.title()
Index.board = "#{g.BOARD}" Index.board = "#{g.BOARD}"
try try

View File

@ -113,11 +113,10 @@ Navigate =
QR.flagsInput() QR.flagsInput()
$.cache '//a.4cdn.org/boards.json', ({target}) -> $.cache '//a.4cdn.org/boards.json', ->
return unless target.status is 200
try try
for aboard in target.response.boards when aboard.board is boardID return unless @status is 200
for aboard in @response.boards when aboard.board is boardID
board = aboard board = aboard
break break
@ -126,7 +125,6 @@ Navigate =
message: "Navigation failed to update board name." message: "Navigation failed to update board name."
error: err error: err
] ]
return false
return unless board return unless board
Navigate.updateTitle board Navigate.updateTitle board