mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-24 23:37:57 +01:00
Fix npe on load
This commit is contained in:
parent
9650d27490
commit
2c57631ce6
@ -52,8 +52,13 @@ abstract class PersistenceManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected getCSRFToken(): string {
|
protected getCSRFToken(): string | null {
|
||||||
return document.head.querySelector('meta[name="_csrf"]').getAttribute('content');
|
const meta = document.head.querySelector('meta[name="_csrf"]');
|
||||||
|
let result = null;
|
||||||
|
if (meta) {
|
||||||
|
result = meta.getAttribute('content');
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
load(mapId: string) {
|
load(mapId: string) {
|
||||||
|
Loading…
Reference in New Issue
Block a user