Skip to content

Commit

Permalink
change Promise -> defer on entrylms.confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
kimorkim committed Oct 23, 2017
1 parent a643afa commit 100f905
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/renderer/src/require.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,11 @@ window.entrylms = {
},
confirm: function (text) {
var isConfirm = confirm(text);
return new Promise((resolve, reject) => {
resolve(isConfirm);
});
var defer = new $.Deferred;
return defer.resolve(isConfirm);
// 기본 Promise로 동작시키면 then이 비동기로 동작하여 타이밍 문제 발생
// return new Promise((resolve, reject) => {
// resolve(isConfirm);
// });
},
}

0 comments on commit 100f905

Please sign in to comment.