1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-10-19 09:47:38 +00:00

Merge #1909 from @nameanyone

This commit is contained in:
Jermolene
2015-12-23 12:19:47 +00:00
parent 7037b66479
commit 57ceffd67c
6 changed files with 81 additions and 55 deletions

View File

@@ -643,4 +643,15 @@ exports.tagToCssSelector = function(tagName) {
};
/*
IE does not have sign function
*/
exports.sign = Math.sign || function(x) {
x = +x; // convert to a number
if (x === 0 || isNaN(x)) {
return x;
}
return x > 0 ? 1 : -1;
};
})();