akidee / extensions.js

Basic ECMAScript extensions for both client and server. Deprecated!
2 stars 0 forks source link

extendDeep #1

Closed dvv closed 14 years ago

dvv commented 14 years ago

Hi! Discovered a subtle issue: deeply extending {} with an object with an array property results in array being transformed to object: ['a', 'b'] --> {'0': 'a', '1': 'b'}. It prevents from schema validation using enum which must be essentially an array.

--dvv

akidee commented 14 years ago

Commit: http://github.com/akidee/extensions.js/commit/af0744bfe45e64e1a786647fdc92b138b1c0e1da Tell me if it works

dvv commented 14 years ago

Works. Thanks!

akidee commented 14 years ago

Closed.