소스 검색

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
KernelDeimos 2 달 전
부모
커밋
794778d665
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      src/dev-center/js/dev-center.js

+ 6 - 2
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('');
 })