Comparing version 1.1.1 to 1.1.2
@@ -32,5 +32,5 @@ 'use strict'; | ||
var re = /<!DOCTYPE html>/; | ||
var doctype = re.exec(html); | ||
var result = re.exec(html); | ||
var cleanHtml = doctype ? html.slice(0, doctype.lastIndex) + html.slice(doctype.lastIndex + 15) : html; | ||
var cleanHtml = result ? html.slice(0, re.lastIndex) + html.slice(re.lastIndex + 15) : html; | ||
@@ -37,0 +37,0 @@ socket.emit('html', cleanHtml); |
{ | ||
"name": "hotloader", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "simple lib for fast html hotloading", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -37,6 +37,6 @@ const fs = require('fs') | ||
const re = /<!DOCTYPE html>/ | ||
const doctype = re.exec(html) | ||
const result = re.exec(html) | ||
const cleanHtml = doctype | ||
? html.slice(0, doctype.lastIndex) + html.slice(doctype.lastIndex + 15) | ||
const cleanHtml = result | ||
? html.slice(0, re.lastIndex) + html.slice(re.lastIndex + 15) | ||
: html | ||
@@ -43,0 +43,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
204193