mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Clean up jsDump modifications a bit.
This commit is contained in:
parent
3a043e0023
commit
90d4834c01
1 changed files with 5 additions and 4 deletions
|
@ -10,14 +10,15 @@
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Register a jsDump parser for Base and override object parser to handle it
|
// Register a jsDump parser for Base.
|
||||||
|
|
||||||
var objectParser = QUnit.jsDump.parsers.object;
|
|
||||||
|
|
||||||
QUnit.jsDump.setParser('Base', function (obj, stack) {
|
QUnit.jsDump.setParser('Base', function (obj, stack) {
|
||||||
return obj.toString();
|
return obj.toString();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Override the default object parser to handle Base objects.
|
||||||
|
// We need to keep a reference to the previous implementation.
|
||||||
|
var objectParser = QUnit.jsDump.parsers.object;
|
||||||
|
|
||||||
QUnit.jsDump.setParser('object', function (obj, stack) {
|
QUnit.jsDump.setParser('object', function (obj, stack) {
|
||||||
return (obj instanceof Base
|
return (obj instanceof Base
|
||||||
? QUnit.jsDump.parsers.Base
|
? QUnit.jsDump.parsers.Base
|
||||||
|
|
Loading…
Reference in a new issue