mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-12 19:49:59 +05:00
guard against possible type error, lint compliance
This commit is contained in:
parent
24ccb6d9e7
commit
96a12d12a9
@ -1,5 +1,6 @@
|
||||
(function () {
|
||||
var logoPath = '/customize/CryptPad_logo.svg';
|
||||
if (location.pathname == '/' || location.pathname == '/index.html') {
|
||||
if (location.pathname === '/' || location.pathname === '/index.html') {
|
||||
logoPath = '/customize/CryptPad_logo_hero.svg';
|
||||
}
|
||||
|
||||
@ -14,6 +15,7 @@ elem.innerHTML = [
|
||||
'</div>'
|
||||
].join('');
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function(e) {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.body.appendChild(elem);
|
||||
});
|
||||
}());
|
||||
|
||||
@ -1955,7 +1955,10 @@ define([
|
||||
rtStarted = true;
|
||||
|
||||
// Remove the outer placeholder once iframe overwrites it for sure
|
||||
document.querySelector('#placeholder').remove();
|
||||
var placeholder = document.querySelector('#placeholder');
|
||||
if (placeholder && typeof(placeholder.remove) === 'function') {
|
||||
placeholder.remove();
|
||||
}
|
||||
|
||||
var replaceHash = function (hash) {
|
||||
// The pad has just been created but is not stored yet. We'll switch
|
||||
|
||||
Loading…
Reference in New Issue
Block a user