diff --git a/src/api/layers.js b/src/api/layers.js
index <HASH>..<HASH> 100644
--- a/src/api/layers.js
+++ b/src/api/layers.js
@@ -174,7 +174,7 @@
           viz.addTooltip(layerView);
         }
         if(options.legends) {
-          viz.addLegends([layerData], (options.mobile_layout || options.force_mobile));
+          viz.addLegends([layerData], ((mobileEnabled && options.mobile_layout) || options.force_mobile));
         }
         if(options.time_slider && layerView.model.get('type') === 'torque') {
           viz.addTimeSlider(layerView);
Fixes a bug that prevented showing the legends when using createLayer