1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

Fix empty string handling in push notifications

Fixes https://github.com/vector-im/riot-web/issues/11460

Empty strings are falsey, and the state key match for a tombstone event is an empty string. Ergo, nothing happens because all the conditions fail.
This commit is contained in:
Travis Ralston
2019-11-25 16:35:27 -07:00
parent ccc85d98e2
commit aa37f697bf
2 changed files with 11 additions and 7 deletions

View File

@@ -714,3 +714,7 @@ module.exports.ensureNoTrailingSlash = function(url) {
module.exports.sleep = (ms, value) => new Promise((resolve => {
setTimeout(resolve, ms, value);
}));
module.exports.isNullOrUndefined = function(val) {
return val === null || val === undefined;
};