Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typos in advise.js (dcl v2) #26

Closed
wkeese opened this issue Jun 23, 2018 · 0 comments
Closed

typos in advise.js (dcl v2) #26

wkeese opened this issue Jun 23, 2018 · 0 comments
Assignees

Comments

@wkeese
Copy link

wkeese commented Jun 23, 2018

I'm getting exceptions when removing advice in dcl v2. Looks like it's due to a typo in the code... In advise.js you have three places that call convert() and then reference result.handles (with an s):

result = convert(null, advice, instance, name, 'value');
prop.value = result.value;
handles.push(result.handles);

Yet if you look at that convert() method, it returns "handle" not "handles":

function convert (value, advice, instance, name, type) {
	if (!value || !(value.node instanceof Node)) {
		value = makeStub(value);
		value.node.instance = instance;
		value.node.name = name;
		value.node.type = type;
	}
	var node = value.node.addAdvice(advice, instance, name, type);
	return {value: value, handle: node};
}

I saw the error running the regression tests for ibm-js/decor (like the getSetObserver test in tests/unit/Stateful.js) but I didn't bother making a minimal test case.

@uhop uhop added the bug label Jun 24, 2018
@uhop uhop self-assigned this Jun 24, 2018
@uhop uhop closed this as completed in 3355cbc Jun 24, 2018
@uhop uhop added the confirmed label Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants