funcool / bide

A simple routing library for ClojureScript
BSD 2-Clause "Simplified" License
131 stars 20 forks source link

Fix google closure compiler warning #22

Closed rrrnld closed 3 years ago

rrrnld commented 5 years ago

This fixes https://github.com/funcool/bide/issues/17. While it's true that toString.call(x) is not incorrect (because everything, including window, inherits from Object), this

  1. removes the warning emitted by Google Closure Compiler because we're implicity referencing a global variable
  2. makes compiler output less noisy for some people
  3. improves consistency because the Object.prototype-pattern is used elsewhere as well (see line 15 of helper.js for an example)
pepe commented 5 years ago

It removes the warning, which is a good thing. Could be merged pretty please?