File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 76
76
var allIntroSteps = [ ] ;
77
77
78
78
for ( var i = 0 , stepsLength = this . _options . steps . length ; i < stepsLength ; i ++ ) {
79
- var currentItem = this . _options . steps [ i ] ;
79
+ var currentItem = _cloneObject ( this . _options . steps [ i ] ) ;
80
80
//set the step
81
81
currentItem . step = i + 1 ;
82
82
//use querySelector function only when developer used CSS selector
206
206
return false ;
207
207
}
208
208
209
+ /*
210
+ * makes a copy of the object
211
+ * @api private
212
+ * @method _cloneObject
213
+ */
214
+ function _cloneObject ( object ) {
215
+ if ( object == null || typeof ( object ) != 'object' || object . hasOwnProperty ( "nodeName" ) === true ) {
216
+ return object ;
217
+ }
218
+ var temp = { } ;
219
+ for ( var key in object ) {
220
+ temp [ key ] = _cloneObject ( object [ key ] ) ;
221
+ }
222
+ return temp ;
223
+ }
209
224
/**
210
225
* Go to specific step of introduction
211
226
*
You can’t perform that action at this time.
0 commit comments