CSNW / sql-bricks

Transparent, Schemaless SQL Generation
http://csnw.github.io/sql-bricks
MIT License
204 stars 25 forks source link

Fix inherits() for older browsers #54

Closed Suor closed 9 years ago

Suor commented 9 years ago

Looks like your inherits() implementation for browsers without Object.create() is broken.

prust commented 9 years ago

Great catch, thank you! I had copied the implementation from https://gist.github.com/kof/885027. I just corrected it in my gist too (https://gist.github.com/prust/5936064).

I did have to make one change to get the tests to pass -- b/c this is in "strict mode", the function noop() { } had to be declared at the top of the function it is in... I don't really like that -- I prefer to declare things close to where they're used -- but there are benefits to strict mode, so I decided to change it to make strict mode happy.