diff options
author | luxagraf <sng@luxagraf.net> | 2018-09-02 10:36:13 -0600 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2018-09-02 10:36:13 -0600 |
commit | 9d5155cf8892e76c610b6e78ec52be0345835a07 (patch) | |
tree | 838cb8733ff7bbd594e84d4feebba60b4c97624a /app/utils/static | |
parent | e08504fd04a9a630803cedeea5d0d5e6aecca9f9 (diff) |
added check for image loader.js
Diffstat (limited to 'app/utils/static')
-rw-r--r-- | app/utils/static/image-loader.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/utils/static/image-loader.js b/app/utils/static/image-loader.js index f68da83..87be0c8 100644 --- a/app/utils/static/image-loader.js +++ b/app/utils/static/image-loader.js @@ -1,7 +1,9 @@ function add_images(){ var el = document.getElementById("id_body_markdown"); - var iframe = '<iframe frameborder="0" style="border: #dddddd 1px solid;margin-left: 20px;width:330px; height:720px;" src="/luximages/insert/?textarea='+el.id+'"></iframe>'; - el.insertAdjacentHTML('afterend', iframe); + if (el){ + var iframe = '<iframe frameborder="0" style="border: #dddddd 1px solid;margin-left: 20px;width:330px; height:720px;" src="/luximages/insert/?textarea='+el.id+'"></iframe>'; + el.insertAdjacentHTML('afterend', iframe); + } var featured_image = document.getElementById("id_featured_image") |