Skip to content

Instantly share code, notes, and snippets.

@lsiden
Created May 5, 2010 20:03
Show Gist options
  • Select an option

  • Save lsiden/391348 to your computer and use it in GitHub Desktop.

Select an option

Save lsiden/391348 to your computer and use it in GitHub Desktop.
diff --git a/frameworks/desktop/views/select_field.js b/frameworks/desktop/views
index 67df81a..c4dfb22 100644
--- a/frameworks/desktop/views/select_field.js
+++ b/frameworks/desktop/views/select_field.js
@@ -253,6 +253,8 @@ SC.SelectFieldView = SC.FieldView.extend(
found = null ; // matching object goes here.
while(!found && (--loc >= 0)) {
object = objects.objectAt? objects.objectAt(loc) : objects[loc] ;
+
+ if (!object) continue;
// get value using valueKey if there is one or use object
// map to _guid or toString.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment