Permalink
Browse files

- `markSeen` logic concentrated in 'markSeenAs' method

  • Loading branch information...
1 parent 5460871 commit 00fd0be2c60e4a49d61783c0507fab7b1ce86caf nickolay committed Jul 15, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/Data/Visitor.js
View
@@ -47,8 +47,8 @@ Class('Data.Visitor', {
},
- markSeen : function (object) {
- this.seen[ object.__REFADR__ ] = object
+ markSeenAs : function (object, as) {
+ return this.seen[ object.__REFADR__ ] = as
},
@@ -64,7 +64,7 @@ Class('Data.Visitor', {
var REFADR = this.assignRefAdrTo(object)
- this.markSeen(object)
+ this.markSeenAs(object, object)
if (Joose.O.isInstance(object)) return this.seen[ REFADR ] = this.visitJooseInstance(object, className)
@@ -74,7 +74,7 @@ Class('Data.Visitor', {
if (!this.meta.hasMethod(methodName)) methodName = 'visitObject'
- return this.seen[ REFADR ] = this[ methodName ](object, className)
+ return this.markSeenAs(object, this[ methodName ](object, className))
},

0 comments on commit 00fd0be

Please sign in to comment.