Fixed Gulp build pipeline

This commit is contained in:
squidfunk
2017-02-26 11:55:47 +01:00
parent 2c3ca5aeb4
commit 09d579b516
12 changed files with 40 additions and 27 deletions

View File

@@ -42,14 +42,16 @@ export default class Shadow {
const ref = (typeof el === "string")
? document.querySelector(el)
: el
if (!(ref instanceof Node) ||
!(ref.parentNode instanceof HTMLElement) ||
!(ref.parentNode.previousElementSibling instanceof HTMLElement))
if (!(ref instanceof HTMLElement) ||
!(ref.parentNode instanceof HTMLElement))
throw new ReferenceError
/* Grab parent and header */
this.el_ = ref.parentNode
this.header_ = ref.parentNode.previousElementSibling
this.el_ = ref.parentNode
if (!(this.el_.parentNode instanceof HTMLElement) ||
!(this.el_.parentNode.previousElementSibling instanceof HTMLElement))
throw new ReferenceError
this.header_ = this.el_.parentNode.previousElementSibling
/* Initialize height and state */
this.height_ = 0