File tree 2 files changed +12
-9
lines changed
2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 1
1
diff --git a/node_modules/elliptic/node_modules/bn.js/lib/bn.js b/node_modules/elliptic/node_modules/bn.js/lib/bn.js
2
- index 3a4371e..629ed9c 100644
3
2
--- a/node_modules/elliptic/node_modules/bn.js/lib/bn.js
4
3
+++ b/node_modules/elliptic/node_modules/bn.js/lib/bn.js
5
- @@ -48,12 +48,14 @@
4
+ @@ -48,14 +48,16 @@
6
5
BN.BN = BN;
7
6
BN.wordSize = 26;
8
7
@@ -13,16 +12,18 @@ index 3a4371e..629ed9c 100644
13
12
- Buffer = window.Buffer;
14
13
- } else {
15
14
- Buffer = require('buffer').Buffer;
15
+ - }
16
16
+ var customBuffer = require('../../../../../src/buffer-shim');
17
17
+ BNBuffer = customBuffer.Buffer || customBuffer.default;
18
- + } catch (e) {
18
+ } catch (e) {
19
19
+ try {
20
20
+ BNBuffer = require('buffer/').Buffer;
21
21
+ } catch (e2) {
22
22
+ BNBuffer = null;
23
- }
23
+ + }
24
24
}
25
25
26
+ BN.isBN = function isBN (num) {
26
27
@@ -526,8 +528,8 @@
27
28
};
28
29
Original file line number Diff line number Diff line change @@ -124,8 +124,12 @@ export const GlobalModal = ({ children }) => {
124
124
}
125
125
} ;
126
126
127
- const showModal = ( modalType , modalProps = { } ) => {
128
- console . log ( 'Will show modal (global).' ) ;
127
+ /* Without this setTimeout, calling showModal right after hiding an existing
128
+ * modal will not display the backdrop due to a race condition. setTimeout
129
+ * sends this method to the end of the event loop, making sure that it is
130
+ * executed after the previous jquery calls
131
+ */
132
+ const showModal = ( modalType , modalProps = { } ) => setTimeout ( ( ) => {
129
133
setStore ( {
130
134
...store ,
131
135
modalType,
@@ -135,10 +139,8 @@ export const GlobalModal = ({ children }) => {
135
139
// Sometimes the modal backdrop won't show up again after being
136
140
// removed forcefully by the hideModal, so we should just show it
137
141
// again.
138
- const modal = $ ( '.modal-backdrop' ) ;
139
- console . log ( 'modal:' , modal ) ;
140
142
$ ( '.modal-backdrop' ) . fadeIn ( 150 ) ;
141
- } ;
143
+ } , 0 ) ;
142
144
143
145
/**
144
146
* Helper method to handle the modal's DOM lifecycle: showing the modal and
You can’t perform that action at this time.
0 commit comments