Skip to content

Commit cf57598

Browse files
committed
fix indentation in AddToCart if block
1 parent 0ebd3ac commit cf57598

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/FacebookEventForwarder.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,15 @@ var name = 'Facebook',
217217
}
218218
else if (event.ProductAction.ProductActionType == mParticle.ProductActionType.AddToCart){
219219
eventName = ADD_TO_CART_EVENT_NAME;
220-
if (event.ProductAction.TransactionId) {
221-
params['order_id'] = event.ProductAction.TransactionId;
222-
}
223-
224-
// Build contents array for AddToCart events
225-
contents = buildProductContents(event.ProductAction.ProductList);
226-
if (contents && contents.length > 0) {
227-
params['contents'] = contents;
228-
}
220+
if (event.ProductAction.TransactionId) {
221+
params['order_id'] = event.ProductAction.TransactionId;
222+
}
229223

224+
// Build contents array for AddToCart events
225+
contents = buildProductContents(event.ProductAction.ProductList);
226+
if (contents && contents.length > 0) {
227+
params['contents'] = contents;
228+
}
230229
}
231230
else{
232231
eventName = VIEW_CONTENT_EVENT_NAME;

0 commit comments

Comments
 (0)