From 794778d665b0ae6dfa92b727a5f88fc604e982cd Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Tue, 25 Feb 2025 17:19:41 -0500 Subject: [PATCH] fix: dev-center undefined error I uploaded a video for this one but just realized I never made a commit for it - it was hiding in my git stash. So here will be a rare situation that the video link is able to be placed inside the commit message: https://youtu.be/8XiFR1o5Vuk --- src/dev-center/js/dev-center.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/dev-center/js/dev-center.js b/src/dev-center/js/dev-center.js index d7c7805a0..caf075ce9 100644 --- a/src/dev-center/js/dev-center.js +++ b/src/dev-center/js/dev-center.js @@ -2259,8 +2259,11 @@ $(document).on('click', '.insta-deploy-app-selector', function (e) { $(document).on('click', '.insta-deploy-existing-app-deploy-btn', function (e) { $('.insta-deploy-existing-app-deploy-btn').addClass('disabled'); $('.insta-deploy-existing-app-select')?.get(0)?.close(); + + const app_item = $('.insta-deploy-app-selector.active'); + // load the 'App Settings' section - edit_app_section($('.insta-deploy-app-selector.active').attr('data-name')); + edit_app_section(app_item.attr('data-name')); $('.drop-area').removeClass('drop-area-hover'); $('.drop-area').addClass('drop-area-ready-to-deploy'); @@ -2268,7 +2271,8 @@ $(document).on('click', '.insta-deploy-existing-app-deploy-btn', function (e) { $('.drop-area').html(drop_area_content); // deploy - deploy({ uid: $(e.target).attr('data-uid') }, source_path ?? dropped_items); + console.log('data uid is present?', $(e.target).attr('data-uid'), app_item.attr('data-uid')); + deploy({ uid: app_item.attr('data-uid') }, source_path ?? dropped_items); $('.insta-deploy-existing-app-list').html(''); })