Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing 'maximum call stack size exceeded' errors #260

Merged
merged 4 commits into from
Jan 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,10 @@ Basic behaviour:

## Release notes

#### v0.9.2 [commits](https://github.com/thedersen/backbone.validation/compare/v0.9.1...v0.9.2)

* Fixed `flatten()` method causing `Maximum call stack size exceeded` errors. Fixes [#260](https://github.com/thedersen/backbone.validation/issues/260) [#180](https://github.com/thedersen/backbone.validation/issues/180) [#210](https://github.com/thedersen/backbone.validation/issues/210) [#224](https://github.com/thedersen/backbone.validation/issues/224) [#233](https://github.com/thedersen/backbone.validation/issues/233)

#### v0.9.1 [commits](https://github.com/thedersen/backbone.validation/compare/v0.9.0...v0.9.1)

* Upgraded buster.js to v0.7.8
Expand Down
4 changes: 2 additions & 2 deletions dist/backbone-validation-amd-min.js

Large diffs are not rendered by default.

12 changes: 3 additions & 9 deletions dist/backbone-validation-amd.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Backbone.Validation v0.9.1
// Backbone.Validation v0.9.2
//
// Copyright (c) 2011-2014 Thomas Pedersen
// Copyright (c) 2011-2015 Thomas Pedersen
// Distributed under MIT License
//
// Documentation and full license available at:
Expand Down Expand Up @@ -71,13 +71,7 @@

_.each(obj, function(val, key) {
if(obj.hasOwnProperty(key)) {
if (val && typeof val === 'object' && !(
val instanceof Array ||
val instanceof Date ||
val instanceof RegExp ||
val instanceof Backbone.Model ||
val instanceof Backbone.Collection)
) {
if (!!val && typeof val === 'object' && val.constructor === Object) {
flatten(val, into, prefix + key + '.');
}
else {
Expand Down
4 changes: 2 additions & 2 deletions dist/backbone-validation-min.js

Large diffs are not rendered by default.

12 changes: 3 additions & 9 deletions dist/backbone-validation.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Backbone.Validation v0.9.1
// Backbone.Validation v0.9.2
//
// Copyright (c) 2011-2014 Thomas Pedersen
// Copyright (c) 2011-2015 Thomas Pedersen
// Distributed under MIT License
//
// Documentation and full license available at:
Expand Down Expand Up @@ -64,13 +64,7 @@ Backbone.Validation = (function(_){

_.each(obj, function(val, key) {
if(obj.hasOwnProperty(key)) {
if (val && typeof val === 'object' && !(
val instanceof Array ||
val instanceof Date ||
val instanceof RegExp ||
val instanceof Backbone.Model ||
val instanceof Backbone.Collection)
) {
if (!!val && typeof val === 'object' && val.constructor === Object) {
flatten(val, into, prefix + key + '.');
}
else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "backbone-validation",
"title": "Backbone.Validation",
"version": "0.9.1",
"version": "0.9.2",
"author": {
"name": "Thomas Pedersen",
"url": "http://thedersen.com/"
Expand Down
8 changes: 1 addition & 7 deletions src/backbone-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,7 @@ Backbone.Validation = (function(_){

_.each(obj, function(val, key) {
if(obj.hasOwnProperty(key)) {
if (val && typeof val === 'object' && !(
val instanceof Array ||
val instanceof Date ||
val instanceof RegExp ||
val instanceof Backbone.Model ||
val instanceof Backbone.Collection)
) {
if (!!val && typeof val === 'object' && val.constructor === Object) {
flatten(val, into, prefix + key + '.');
}
else {
Expand Down