Skip to content

Commit 8850b35

Browse files
committed
refactor(tutor-setup): remove loadSampleCourse variable and inline check
1 parent 8caa9e4 commit 8850b35

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

assets/src/js/admin-dashboard/tutor-setup.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ document.addEventListener('DOMContentLoaded', () => {
190190
const loadingScreen = submitButton?.dataset.screen || __('Loading...', 'tutor');
191191
isSubmitting = true;
192192
toggleReloadProtection(true);
193-
const loadSampleCourse = formData.get('tutor_onboard_load_sample_course');
194193

195194
if (submitButton) {
196195
submitButton.disabled = true;
@@ -202,7 +201,7 @@ document.addEventListener('DOMContentLoaded', () => {
202201
const onboardStartTime = performance.now();
203202

204203
try {
205-
if (loadSampleCourse) {
204+
if (formData.get('tutor_onboard_load_sample_course')) {
206205
const importSuccess = await importSampleCourses();
207206
if (!importSuccess) {
208207
tutor_toast(__('Sample course import failed.', 'tutor'), '', 'error');

0 commit comments

Comments
 (0)