1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 10:29:54 +00:00

Don't throw errors when hitting limits of the fakedom

This commit is contained in:
Jermolene 2017-06-05 16:12:43 +01:00
parent 1733a2c39c
commit 432542bbcc

View File

@ -224,8 +224,7 @@ Object.defineProperty(TW_Element.prototype, "textContent", {
get: function() {
if(this.isRaw) {
if(this.rawTextContent === null) {
console.log(booboo)
throw "Cannot get textContent on a raw TW_Element";
return "";
} else {
return this.rawTextContent;
}
@ -245,7 +244,7 @@ Object.defineProperty(TW_Element.prototype, "textContent", {
Object.defineProperty(TW_Element.prototype, "formattedTextContent", {
get: function() {
if(this.isRaw) {
throw "Cannot get formattedTextContent on a raw TW_Element";
return "";
} else {
var b = [],
isBlock = $tw.config.htmlBlockElements.indexOf(this.tag) !== -1;