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 74
74
var allIntroSteps = [ ] ;
75
75
76
76
for ( var i = 0 , stepsLength = this . _options . steps . length ; i < stepsLength ; i ++ ) {
77
- var currentItem = this . _options . steps [ i ] ;
77
+ var currentItem = _cloneObject ( this . _options . steps [ i ] ) ;
78
78
//set the step
79
79
currentItem . step = i + 1 ;
80
80
//use querySelector function only when developer used CSS selector
204
204
return false ;
205
205
}
206
206
207
+ /*
208
+ * makes a copy of the object
209
+ * @api private
210
+ * @method _cloneObject
211
+ */
212
+ function _cloneObject ( object ) {
213
+ if ( object == null || typeof ( object ) != 'object' ) {
214
+ return object ;
215
+ }
216
+ var temp = { } ;
217
+ for ( var key in object ) {
218
+ temp [ key ] = _cloneObject ( object [ key ] ) ;
219
+ }
220
+ return temp ;
221
+ }
207
222
/**
208
223
* Go to specific step of introduction
209
224
*
You can’t perform that action at this time.
0 commit comments