Commit 21d0e11
committed
Fix client compilation error in base64()
Context :
The base64 function tries using the btoa function and falls back to
using Buffer if btoa is not available.
Problem :
In the context of a dom, you have btoa, and you may not necessarily have
Buffer, and in the case the fallback branch creates a compilation error
"TS2591: Cannot find name 'Buffer'."
Solution :
Add a @ts-ignore in the fallback branch because we will always have
either btoa or Buffer available in the forseable future.1 parent aae6306 commit 21d0e11
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
0 commit comments