test content
What is the Arc Client?
Install Arc

Gateway: Can't start new assignment without first selecting a category

bajornorbertbajornorbert Member, NW M9 Playtest Posts: 272 Arc User
edited June 2013 in Bug Reports (PC)
The last update introduced a "remember last category" option, but it also introduced a bug with it.

How to reproduce:
  1. Log in & select professions tab
  2. Click start task (w/o clicking on any category first)

Result:
Does nothing, chrome developer tools, show a lastCategory undefined error.

Expected result:
Open Leadership category for selecting tasks.

What causes it:
I haven't got the time to go through the entire js, but after a quick search i found this in client.js which is the file in which the error occures:
h.professionGoToTaskList=function(){d.lastCategory||(d.lastCategory="Leadership")

d.lastCategory is first defined when you select a category, in case you click the start task without first selecting a category d.lastCategory will remain undefined

How to fix:
Replace
d.lastCategory||(d.lastCategory="Leadership")
with
if (typeof d.lastCategory === 'undefined') { d.lastCategory="Leadership"; }
or
d.lastCategory = typeof d.lastCategory === 'undefined' && "Leadership" || d.lastCategory;
Post edited by Unknown User on

Comments

  • pumlekpumlek Member Posts: 0 Arc User
    edited June 2013
    Bravo!
    Hopefully since you've already done the heavy lifting, a fix will be soon in coming. But in the meantime, thanks for the workaround.
Sign In or Register to comment.