1
0
mirror of https://github.com/twitter/twemoji.git synced 2024-06-15 03:35:16 +00:00

Validation node passed to parseNode

This commit is contained in:
Peter Wilson 2015-05-04 16:12:29 +10:00
parent 990fa702a2
commit f9ea20e7a3
5 changed files with 13 additions and 1 deletions

View File

@ -601,6 +601,9 @@ function createTwemoji(re) {
* @return Element same generic node with emoji in place, if any.
*/
function parseNode(node, options) {
if ( typeof node === "undefined" || node === null ) {
return node;
}
var
allText = grabAllTextNodes(node, []),
length = allText.length,

View File

@ -324,6 +324,9 @@ define(function () {
* @return Element same generic node with emoji in place, if any.
*/
function parseNode(node, options) {
if ( typeof node === "undefined" || node === null ) {
return node;
}
var
allText = grabAllTextNodes(node, []),
length = allText.length,

View File

@ -323,6 +323,9 @@ var twemoji = (function (
* @return Element same generic node with emoji in place, if any.
*/
function parseNode(node, options) {
if ( typeof node === "undefined" || node === null ) {
return node;
}
var
allText = grabAllTextNodes(node, []),
length = allText.length,

2
twemoji.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -324,6 +324,9 @@ var twemoji = (function (
* @return Element same generic node with emoji in place, if any.
*/
function parseNode(node, options) {
if ( typeof node === "undefined" || node === null ) {
return node;
}
var
allText = grabAllTextNodes(node, []),
length = allText.length,