fixed debug option
This commit is contained in:
parent
0f21c841f2
commit
cccffd3fa4
|
@ -30,7 +30,7 @@
|
||||||
constructor(init, opts) {
|
constructor(init, opts) {
|
||||||
// define options
|
// define options
|
||||||
this.store = (opts || {}).store;
|
this.store = (opts || {}).store;
|
||||||
this.debug = (opts || {}).debug;
|
this.debug = (opts || {}).debug || false;
|
||||||
|
|
||||||
// initialize the collection
|
// initialize the collection
|
||||||
this.records = Array.isArray(init) ? init : [];
|
this.records = Array.isArray(init) ? init : [];
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_log() {
|
_log() {
|
||||||
if(!this.debug) {
|
if(this.debug) {
|
||||||
console.log(...arguments);
|
console.log(...arguments);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue