Skip to content

Commit

Permalink
Don;t include element type when using unique identifier - easier to r…
Browse files Browse the repository at this point in the history
…esolve when dom changes
  • Loading branch information
Arjun Kannan authored and Arjun Kannan committed May 16, 2015
1 parent ee937a3 commit e41d12b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/js/jQueryGetPath.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* globals jQuery */
jQuery.fn.extend({
getPath: function(){
getPath: function () {
"use strict";
var path;
var node = this;
Expand All @@ -19,7 +19,7 @@ jQuery.fn.extend({
var tag = uniqueTags[i];
var tagValue = node.attr(tag);
if (tagValue && (tagValue.trim !== '')) {
name += '[' + tag + '=\"' + tagValue + '\"]';
name = '[' + tag + '=\"' + tagValue + '\"]';
//we've found a unique identifier so we're done
uniqueIdentifierFound = true;
break; //exit for loop
Expand Down
4 changes: 2 additions & 2 deletions src/js/jQueryGetPath.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* globals jQuery */
jQuery.fn.extend({
getPath: function(){
getPath: function () {
"use strict";
var path;
var node = this;
Expand All @@ -19,7 +19,7 @@ jQuery.fn.extend({
var tag = uniqueTags[i];
var tagValue = node.attr(tag);
if (tagValue && (tagValue.trim !== '')) {
name += '[' + tag + '=\"' + tagValue + '\"]';
name = '[' + tag + '=\"' + tagValue + '\"]';
//we've found a unique identifier so we're done
uniqueIdentifierFound = true;
break; //exit for loop
Expand Down

0 comments on commit e41d12b

Please sign in to comment.