Skip to content

Commit 51fc0f7

Browse files
committed
Change name of decorator registration function
1 parent 094ec04 commit 51fc0f7

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/core/friendly_errors/param_validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ function validateParams(p5, fn, lifecycles) {
573573

574574
fn._validate = validate; // TEMP: For unit tests
575575

576-
p5.decorateHelper(
576+
p5.registerDecorator(
577577
({ path }) => {
578578
return path.startsWith('p5.prototype');
579579
},

src/core/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class p5 {
162162
}
163163

164164
static decorations = new Map();
165-
static decorateHelper(pattern, decoration){
165+
static registerDecorator(pattern, decoration){
166166
if(typeof pattern === 'string'){
167167
const patternStr = pattern;
168168
pattern = ({ path }) => patternStr === path;

test/unit/core/param_errors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ suite('Validate Params', function () {
2929
return 'mock p5.Graphics';
3030
},
3131
_error: () => {},
32-
decorateHelper: () => {},
32+
registerDecorator: () => {},
3333
};
3434
const mockP5Prototype = {};
3535

0 commit comments

Comments
 (0)