Skip to content

Commit d8c1c20

Browse files
HenrikHenrik
authored andcommitted
Check pca object exists before interacting with it
1 parent ecc21ea commit d8c1c20

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

view/frontend/templates/checkout_index_index.phtml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
requirejs(['jquery'], function(){
1111

1212
(function() {
13-
pca.magento.setupCheckout();
13+
if (typeof pca !== "undefined") {
14+
pca.magento.setupCheckout();
15+
}
1416
})();
1517
});
1618

1719
</script>
1820

19-
<?php }
21+
<?php }

0 commit comments

Comments
 (0)