diff --git a/package.json b/package.json
index 2e6efe816..ba8f45fb4 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
"scripts": {
"build": "wp-scripts build ./src/onboarding.js ./src/Scripts/sitegen-theme-marker/sitegen-theme-marker.js ./src/Scripts/sitegen-theme-marker/sitegen-theme-marker.css",
"format": "wp-scripts format ./src",
- "start": "wp-scripts start ./src/onboarding.js",
+ "start": "wp-scripts start ./src/onboarding.js ./src/Scripts/sitegen-theme-marker/sitegen-theme-marker.js ./src/Scripts/sitegen-theme-marker/sitegen-theme-marker.css",
"lint:js": "wp-scripts lint-js ./src",
"lint:js:fix": "wp-scripts lint-js ./src --fix",
"test:e2e": "npx cypress run",
diff --git a/src/Scripts/sitegen-theme-marker/sitegen-theme-marker.js b/src/Scripts/sitegen-theme-marker/sitegen-theme-marker.js
index b22dda751..2c17106e0 100644
--- a/src/Scripts/sitegen-theme-marker/sitegen-theme-marker.js
+++ b/src/Scripts/sitegen-theme-marker/sitegen-theme-marker.js
@@ -1,13 +1,12 @@
-window.onload = function () {
+window.onload = function() {
const homepages = window.nfdOnboarding.homepages.data;
const activeTheme = window.nfdOnboarding.active;
- homepages.forEach( ( homepage ) => {
- const ele = document.getElementById( `${ homepage.slug }-name` );
+ Object.keys( homepages ).forEach( ( slug ) => {
+ const homepage = homepages[ slug ];
+ const ele = document.getElementById( `${ slug }-name` );
if ( ele ) {
ele.innerHTML =
- ( activeTheme === homepage.slug
- ? 'Active:'
- : '' ) +
+ ( activeTheme === slug ? 'Active:' : '' ) +
`