mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-11-27 01:36:43 -05:00
suppress noise from early initialization during unit tests
the tests still all passed, but the missing browser globals in the node environment could cause misleading messages in the mocha output
This commit is contained in:
parent
d40dac4825
commit
ead315251f
1 changed files with 5 additions and 0 deletions
|
|
@ -246,6 +246,11 @@
|
||||||
*/
|
*/
|
||||||
me.init = function()
|
me.init = function()
|
||||||
{
|
{
|
||||||
|
// prevent early init
|
||||||
|
if (typeof document === 'undefined' || typeof navigator === 'undefined' || typeof window === 'undefined') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// prevent bots from viewing a document and potentially deleting data
|
// prevent bots from viewing a document and potentially deleting data
|
||||||
// when burn-after-reading is set
|
// when burn-after-reading is set
|
||||||
if (isBadBot()) {
|
if (isBadBot()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue