Open rugbyprof opened 9 years ago
I fixed the ones that were erroring on me. But there are still a lot of code blocks that are using data assuming it's defined. At the top of aiiController I see testing to ensure that data is an "object". Why did you guys stop?
I haven't pushed my changes yet. I will here in a bit.
What is the deal with all the console errors?
data
to your callback, you should know whatdata type
it is.data
exists before using it, but there is no standard return value.data.records.length
in a "FOR" loop anddata
is a string.data
is going to be an "empty" set or not have value, we need some default return value so we can test before using it. I'm ok with:But a "string" is NOT undefined, and said "string" does not have methods like
records.length
.So come up with a standard value to return and test for or brute force the testing within the callback:
CLEAN UP THE CONSOLE ERRORS......