Fail hard & fast if linkifyjs version is wrong

Rather than carrying on an ending up with undefineds deep within the bowels of linkifyjs when we try to linkify a room alias.
This commit is contained in:
David Baker 2016-09-27 10:38:01 +01:00
parent 2e1644877d
commit 0448dca832

View file

@ -22,6 +22,9 @@ function matrixLinkify(linkify) {
var MultiToken = MT.Base;
var S_START = linkify.parser.start;
if (TT.UNDERSCORE === undefined) {
throw new Error("linkify-matrix requires linkifyjs 2.1.1: this version is too old.");
}
var ROOMALIAS = function(value) {
MultiToken.call(this, value);