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:
parent
990fa702a2
commit
f9ea20e7a3
@ -601,6 +601,9 @@ function createTwemoji(re) {
|
|||||||
* @return Element same generic node with emoji in place, if any.
|
* @return Element same generic node with emoji in place, if any.
|
||||||
*/
|
*/
|
||||||
function parseNode(node, options) {
|
function parseNode(node, options) {
|
||||||
|
if ( typeof node === "undefined" || node === null ) {
|
||||||
|
return node;
|
||||||
|
}
|
||||||
var
|
var
|
||||||
allText = grabAllTextNodes(node, []),
|
allText = grabAllTextNodes(node, []),
|
||||||
length = allText.length,
|
length = allText.length,
|
||||||
|
@ -324,6 +324,9 @@ define(function () {
|
|||||||
* @return Element same generic node with emoji in place, if any.
|
* @return Element same generic node with emoji in place, if any.
|
||||||
*/
|
*/
|
||||||
function parseNode(node, options) {
|
function parseNode(node, options) {
|
||||||
|
if ( typeof node === "undefined" || node === null ) {
|
||||||
|
return node;
|
||||||
|
}
|
||||||
var
|
var
|
||||||
allText = grabAllTextNodes(node, []),
|
allText = grabAllTextNodes(node, []),
|
||||||
length = allText.length,
|
length = allText.length,
|
||||||
|
@ -323,6 +323,9 @@ var twemoji = (function (
|
|||||||
* @return Element same generic node with emoji in place, if any.
|
* @return Element same generic node with emoji in place, if any.
|
||||||
*/
|
*/
|
||||||
function parseNode(node, options) {
|
function parseNode(node, options) {
|
||||||
|
if ( typeof node === "undefined" || node === null ) {
|
||||||
|
return node;
|
||||||
|
}
|
||||||
var
|
var
|
||||||
allText = grabAllTextNodes(node, []),
|
allText = grabAllTextNodes(node, []),
|
||||||
length = allText.length,
|
length = allText.length,
|
||||||
|
2
twemoji.min.js
vendored
2
twemoji.min.js
vendored
File diff suppressed because one or more lines are too long
@ -324,6 +324,9 @@ var twemoji = (function (
|
|||||||
* @return Element same generic node with emoji in place, if any.
|
* @return Element same generic node with emoji in place, if any.
|
||||||
*/
|
*/
|
||||||
function parseNode(node, options) {
|
function parseNode(node, options) {
|
||||||
|
if ( typeof node === "undefined" || node === null ) {
|
||||||
|
return node;
|
||||||
|
}
|
||||||
var
|
var
|
||||||
allText = grabAllTextNodes(node, []),
|
allText = grabAllTextNodes(node, []),
|
||||||
length = allText.length,
|
length = allText.length,
|
||||||
|
Loading…
Reference in New Issue
Block a user