hbi99 / defiant.js

http://defiantjs.com
GNU Affero General Public License v3.0
913 stars 91 forks source link

TypeError: null is not an object (evaluating 'constr.toString().match(self.rx_function)') #118

Open mauro-ferrario opened 5 years ago

mauro-ferrario commented 5 years ago

Hi, I have this issue only on some old version of iPad. The issue is on line 458:

cnName = constr.toString().match(self.rx_function)[1];

I don't know if it's the best solution, but I solved in that way:

cnName = constr.toString().match(self.rx_function) ? [1] : null;

hbi99 commented 5 years ago

Is there any way to reproduce this without the old iPad?

mauro-ferrario commented 5 years ago

No, I just noticed this issue on old iPad (iPad 3), on chrome simulator or other iOS devices is fine.