File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 121121 var _privates = {
122122 ready : false ,
123123
124- storeSplitTest : function ( data ) {
124+ storeAdditionalData : function ( data ) {
125125 var additionalData ;
126126 if ( ! $ . isPlainObject ( data ) ) {
127127 return ;
139139 return ;
140140 }
141141
142- // iterate over the additionalData
142+ // iterate over the additionalData instances
143143 for ( var k = 0 ; k < additionalData . length ; k ++ ) {
144- // console.log (additionalData);
144+ this . storeSplitTest ( additionalData [ k ] ) ;
145145 }
146146 } ,
147147
148+ storeSplitTest : function ( additionalData ) {
149+ if ( ! $ . isPlainObject ( additionalData ) ) {
150+ return ;
151+ } else if ( ! $ . isPlainObject ( additionalData . splitTestData ) ) {
152+ return ;
153+ }
154+
155+ var splitTestData = additionalData . splitTestData ;
156+ // console.log(splitTestData);
157+ } ,
158+
148159 handleRecommendationResponse : function ( data , errorText , callback ) {
149160
150161 // we check for split-tests and store the results in the localStorage
151162 try {
152- this . storeSplitTest ( data ) ;
163+ this . storeAdditionalData ( data ) ;
153164 } catch ( e ) {
154165 // ignore the exception, we still want to handle the response
155166 }
You can’t perform that action at this time.
0 commit comments