Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

- use `defineProperty` for __REF_ADR__ where available to prevent pol…

…lution
  • Loading branch information...
commit 481c2eaa1826e43ec497cee4719f7305414404a1 1 parent 99b6455
authored December 16, 2010

Showing 1 changed file with 6 additions and 1 deletion. Show diff stats Hide diff stats

  1. 7  lib/Data/Visitor.js
7  lib/Data/Visitor.js
@@ -151,7 +151,12 @@ body : function () {
151 151
                 
152 152
                 
153 153
                 assignRefAdrTo : function (object) {
154  
-                    if (!object.__REFADR__) object.__REFADR__ = this.getRefAdrFor(object)
  154
+                    if (!object.__REFADR__) 
  155
+                        if (Object.defineProperty)
  156
+                            Object.defineProperty(object, '__REFADR__', { value : this.getRefAdrFor(object) })
  157
+                        else
  158
+                            object.__REFADR__ = this.getRefAdrFor(object)
  159
+                        
155 160
                     
156 161
                     return object.__REFADR__
157 162
                 }

0 notes on commit 481c2ea

Please sign in to comment.
Something went wrong with that request. Please try again.