colorado-code-for-communities / OpenBike-front-end

OpenBike.co is a bike route planner based off OpenPlans OpenTripPlanner and cibi.me, SFCTA CycleTracks mobile data collection apps.
openbike.co
1 stars 1 forks source link

OTP config.js error #4

Open esbranson opened 11 years ago

esbranson commented 11 years ago

In config.js:43

otp.inherit(otp.config, otp.config_defaults); // step 3a: build the object up

This throws an exception in otp.js:148

otp.inherit = function(C, P) { ... F.prototype = P.prototype;

because the second argument to the function (otp.config_defaults) is undefined.

This only seems to come up in Google Chrome 31.0.1622.0 dev (running on LUbuntu saucy) console logs. Firefox 23 also shows an error in the console logs. openbike.co is not working.

esbranson commented 11 years ago

IDK openbike.co seems to be working fine now. PEBKAC maybe?

Anyways, this `config_defaults' reference does seem mysterious; it is never defined, and thus seems to render both functions non-ops.

In Webapp.js:26 we see the `initialize' function of otp.core.Webapp (which seems to be what is ultimately called by index.html:60 since this is what is called in Webapp.js:106 via otp.Class in otp.js:67) which calls

otp.configure(this, config);

which is different than what we are doing in config.js:45

otp.configure(otp.config, otp.config_defaults); // step 3b: make sure any / all local changes above get applied