fix: null pointer bug in cheat-sheet
This commit is contained in:
parent
71eb6213b9
commit
3dfa29b36d
|
@ -18,6 +18,10 @@ var sourceVisible = localStorage.getItem('source-visible') === 'true';
|
||||||
* @param container
|
* @param container
|
||||||
*/
|
*/
|
||||||
function processContainer(container) {
|
function processContainer(container) {
|
||||||
|
if (!container) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var nodes = container.querySelectorAll('p,h1,h2,h3,h4,h5,h6,header,a');
|
var nodes = container.querySelectorAll('p,h1,h2,h3,h4,h5,h6,header,a');
|
||||||
for(var i in nodes) {
|
for(var i in nodes) {
|
||||||
(function(node) {
|
(function(node) {
|
||||||
|
|
Loading…
Reference in New Issue