Skip to content

Commit

Permalink
Merge pull request #3 from ashbylane/master
Browse files Browse the repository at this point in the history
Checking for undefined namespace before calling slice
  • Loading branch information
testingforoauth committed May 23, 2011
2 parents 8d8bfaf + deaff54 commit e3ea323
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
2 changes: 1 addition & 1 deletion knockout.namespaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
// Non-namespaced KO uses group 6, but we add 2 groups for optional namespaces after data-bind
var dataBindAttributeValue = arguments[8];
// We need to detect whether or not we're binding to a namespace so we know whether to inject the 'applyBindingsToNextSiblingScript'
var namespace = arguments[6].slice(1);
var namespace = arguments[6] ? arguments[6].slice(1) : '';

// Only bind if we're binding to the global namespace or to the current namespace
if (namespace === '' || namespace === ko.currentlyBindingNamespace) {
Expand Down

0 comments on commit e3ea323

Please sign in to comment.