Permalink
Browse files

Fixed an issue with regex in firefox

  • Loading branch information...
1 parent 75db6cd commit 3c63b5944506f6b20c042c84932a1795a2333181 @rsandor committed Oct 24, 2010
Showing with 11 additions and 6 deletions.
  1. +11 −6 gury.js
View
17 gury.js
@@ -246,19 +246,18 @@ window.$g = window.Gury = (function(window, jQuery) {
var lastName = tags[tags.length - 1];
for (var i = 0; i < tags.length; i++) {
- if (!currentSpace.hasChild(tags[i]))
+ if (!currentSpace.hasChild(tags[i])) {
return null;
+ }
+
currentSpace = currentSpace.getChild(tags[i]);
}
return currentSpace;
},
add: function(tag, object) {
- if (!tag.match(TagSpace.TAG_REGEX)) {
- return null;
- }
-
+ var tags = tag.split('.');
var currentSpace = this;
var tags = tag.split('.');
var lastName = tags[tags.length - 1];
@@ -691,7 +690,13 @@ window.$g = window.Gury = (function(window, jQuery) {
function objects(gury, query) {
var objects = new Set();
if (isString(query)) {
- objects = gury._tags.find(query).getObjects();
+ var sp = gury._tags.find(query);
+ if (sp != null) {
+ objects = sp.getObjects();
+ }
+ else {
+ console.log(query);
+ }
}
else if (isDefined(query) && gury._objects.has(query)) {
objects.add(query);

0 comments on commit 3c63b59

Please sign in to comment.