diff --git a/Apps/CesiumViewer/CesiumViewer.js b/Apps/CesiumViewer/CesiumViewer.js index 6a1ba82635a0..3592c9000ad4 100644 --- a/Apps/CesiumViewer/CesiumViewer.js +++ b/Apps/CesiumViewer/CesiumViewer.js @@ -54,13 +54,10 @@ async function main() { try { const hasBaseLayerPicker = !defined(imageryProvider); - let terrainProvider; - if (hasBaseLayerPicker) { - terrainProvider = await createWorldTerrainAsync({ - requestWaterMask: true, - requestVertexNormals: true, - }); - } + const terrainProvider = await createWorldTerrainAsync({ + requestWaterMask: true, + requestVertexNormals: true, + }); viewer = new Viewer("cesiumContainer", { imageryProvider: imageryProvider,