Fix a raw file error caused by facebook CDN violating RFC 2616
This commit is contained in:
parent
e7781b5c09
commit
aeab31825e
4 changed files with 26 additions and 4 deletions
7
src/util/call-once.js
Normal file
7
src/util/call-once.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
export function callOnce(fn) {
|
||||
let called = false;
|
||||
|
||||
return (...args) => {
|
||||
called || fn(...args), called = true;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue