Skip to content

Commit 9472e40

Browse files
author
b4dnewz
committed
Ensure default method public visibility
1 parent cfba773 commit 9472e40

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

node_translators/method.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ module.exports = function (node, indent) {
1818
if (node.isStatic) {
1919
str += 'static ';
2020
}
21+
// Fall back to public if nothing is specified
22+
if (!node.visibility) {
23+
node.visibility = 'public';
24+
}
2125
str += node.visibility + ' function ';
2226
if (node.byref) {
2327
str += '&';

0 commit comments

Comments
 (0)