mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Replace typeof x !== 'undefined' checks with typeof x === 'object'.
This commit is contained in:
parent
94fac965ec
commit
6b45a9382c
2 changed files with 2 additions and 3 deletions
|
@ -13,8 +13,7 @@
|
|||
// This file uses PrePro to preprocess the paper.js source code on the fly in
|
||||
// the browser, avoiding the step of having to manually preprocess it after each
|
||||
// change. This is very useful during development of the library itself.
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
if (typeof window === 'object') {
|
||||
// Browser based loading through PrePro:
|
||||
if (!window.include) {
|
||||
var scripts = document.getElementsByTagName('script');
|
||||
|
|
|
@ -75,7 +75,7 @@ var View = Base.extend(Callback, /** @lends View# */{
|
|||
element.height = size.height;
|
||||
// TODO: Test this on IE:
|
||||
if (PaperScope.hasAttribute(element, 'stats')
|
||||
&& typeof Stats !== 'undefined') {
|
||||
&& typeof Stats === 'object') {
|
||||
this._stats = new Stats();
|
||||
// Align top-left to the element
|
||||
var stats = this._stats.domElement,
|
||||
|
|
Loading…
Reference in a new issue